libhocr-0.10.17/0000777000175000017500000000000011051630066010305 500000000000000libhocr-0.10.17/AUTHORS0000644000175000017500000000004211017002616011261 00000000000000Yaacov Zamir libhocr-0.10.17/configure.ac0000644000175000017500000001730111042711134012505 00000000000000dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([libhocr], [0.10.17], [Yaacov Zamir ]) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE([1.9 foreign]) AC_PROG_CC AM_PROG_LIBTOOL dnl check for pkg-config AC_PATH_PROG(PKG_CONFIG, pkg-config, no) dnl ============================================================================ dnl check host system host_code=1 case ${host} in *linux*) host_code=1 ;; *mingw32*) host_code=2 ;; *darwin*) host_code=3 ;; esac AM_CONDITIONAL(LINUX_HOST, test $host_code = 1 ) AM_CONDITIONAL(MINGW_HOST, test $host_code = 2 ) AM_CONDITIONAL(DARWIN_HOST, test $host_code = 3 ) dnl ============================================================================ dnl check for swig AC_CHECK_PROG(have_swig, "swig", yes, no) dnl ============================================================================ dnl build tiff build_tiff=yes AC_ARG_ENABLE([tiff], [AS_HELP_STRING([--disable-tiff], [do not use libtiff])], [build_tiff=no], [build_tiff=yes]) dnl check for libtiff if test "$build_tiff" = "yes"; then AC_CHECK_LIB([tiff], [TIFFOpen], build_tiff=yes, build_tiff=no) if test "$build_tiff" = "yes"; then tiff_CFLAGS=" -DUSE_TIFF" tiff_LIBS=" -ltiff" AC_SUBST(tiff_CFLAGS) AC_SUBST(tiff_LIBS) ld_tiff="$tiff_LIBS" dnl export ld_tiff librarys to pkg-config pc file AC_SUBST(ld_tiff) fi fi AM_CONDITIONAL(WITH_TIFF, test "$build_tiff" = yes) dnl ============================================================================ dnl build fftw3 build_fftw=yes AC_ARG_ENABLE([fftw], [AS_HELP_STRING([--disable-fftw], [do not use fftw])], [build_fftw=no], [build_fftw=yes]) dnl check for fftw3 if test "$build_fftw" = "yes"; then fftw_pkg_modules="fftw3" PKG_CHECK_MODULES(fftw, [$fftw_pkg_modules], build_fftw=yes, build_fftw=no) if test "$build_fftw" = "yes"; then fftw_CFLAGS+=" -DUSE_FFTW" AC_SUBST(fftw_CFLAGS) AC_SUBST(fftw_LIBS) fi fi AM_CONDITIONAL(WITH_FFTW, test "$build_fftw" = yes) dnl ============================================================================ dnl check for glib build_lib=yes AC_ARG_ENABLE([glib], [AS_HELP_STRING([--disable-glib], [do not use glib])], [build_glib=no], [build_glib=yes]) dnl check for glib if test "$build_glib" = "yes"; then glib_pkg_modules="glib-2.0" PKG_CHECK_MODULES(glib, [$glib_pkg_modules], build_glib=yes, build_glib=no) if test "$build_glib" = "yes"; then glib_CFLAGS+=" -DUSE_GLIB" AC_SUBST(glib_CFLAGS) AC_SUBST(glib_LIBS) fi fi AM_CONDITIONAL(WITH_GLIB, test "$build_glib" = yes) dnl ============================================================================ dnl check for gtk build_gtk=yes AC_ARG_ENABLE([gtk], [AS_HELP_STRING([--disable-gtk], [do not use gtk])], [build_gtk=no], [build_gtk=yes]) dnl check for gtk if test "$build_gtk" = "yes"; then gtk_pkg_modules="gtk+-2.0" PKG_CHECK_MODULES(gtk, [$gtk_pkg_modules], build_gtk=yes, build_gtk=no) if test "$build_gtk" = "yes"; then gtk_CFLAGS+=" -DUSE_GTK" AC_SUBST(gtk_CFLAGS) AC_SUBST(gtk_LIBS) requires_gtk="$gtk_pkg_modules" dnl export required gtk librarys to pkg-config pc file AC_SUBST(requires_gtk) fi fi AM_CONDITIONAL(WITH_GTK, test "$build_gtk" = yes) dnl ============================================================================ dnl check for python AM_PATH_PYTHON([2.5], [have_python=yes], [have_python=no]) build_python=$have_python AC_ARG_ENABLE([python], [AS_HELP_STRING([--disable-python], [do not build python binding])], [build_python=no], [build_python=$have_python]) AC_ARG_WITH(python-sitelib-dir, [AS_HELP_STRING([--with-python-sitelib-dir=PATH], [path to python site lib])]) if test "$have_python" = "yes"; then PY_PREFIX=`python -c 'import sys ; print sys.prefix'` AC_MSG_CHECKING(for $PY_PREFIX/include/python${PYTHON_VERSION}/Python.h) if test -f $PY_PREFIX/include/python${PYTHON_VERSION}/Python.h; then AC_MSG_RESULT(yes) PY_CFLAGS="-I$PY_PREFIX/include/python${PYTHON_VERSION}" if test "$with_python_sitelib_dir" = "" ; then PY_MODULES_PATH=$pythondir else PY_MODULES_PATH=$with_python_sitelib_dir fi AC_SUBST([PY_CFLAGS]) AC_SUBST([PY_MODULES_PATH]) else AC_MSG_RESULT(no) build_python=no fi fi if test "$have_swig" = "no"; then build_python=no fi if test "$build_tiff" = "no"; then build_python=no fi if test "$build_fftw" = "no"; then build_python=no fi AM_CONDITIONAL(WITH_PYTHON, test "$build_python" = "yes") dnl ============================================================================ dnl build hspell build_hspell=yes AC_ARG_ENABLE([hspell], [AS_HELP_STRING([--disable-hspell], [do not use hspell])], [build_hspell=no], [build_hspell=yes]) dnl check for hspell if test "$build_hspell" = "yes"; then AC_CHECK_LIB([hspell], [hspell_get_dictionary_path], build_hspell=yes, build_hspell=no, -lz) if test "$build_hspell" = "yes"; then hspell_CFLAGS=" -DUSE_HSPELL" hspell_LIBS=" -lhspell -lz" AC_SUBST(hspell_CFLAGS) AC_SUBST(hspell_LIBS) ld_hspell="$hspell_LIBS" dnl export ld_hspell librarys to pkg-config pc file AC_SUBST(ld_hspell) fi fi AM_CONDITIONAL(WITH_HSPELL, test "$build_hspell" = yes) dnl ============================================================================ dnl build hocr build_hocr=yes AC_ARG_ENABLE([hocr], [AS_HELP_STRING([--disable-hocr], [do not build hocr utility program])], [build_hocr=no], [build_hocr=yes]) if test "$build_glib" = "no"; then build_hocr=no fi AM_CONDITIONAL(WITH_HOCR, test "$build_hocr" = "yes") dnl ============================================================================ dnl build hocr-gtk build_hocr_gtk=yes AC_ARG_ENABLE([hocr-gtk], [AS_HELP_STRING([--disable-hocr-gtk], [do not build hocr-gtk utility program])], [build_hocr_gtk=no], [build_hocr_gtk=yes]) if test "$build_python" = "no"; then build_hocr_gtk=no fi AM_CONDITIONAL(WITH_HOCR_GTK, test "$build_hocr_gtk" = "yes") dnl ============================================================================ dnl create a build string BUILD_DATE=`date +%d%m%Y` BUILD_STR="$PACKAGE-$VERSION-$build-$BUILD_DATE" if test "$build_tiff" = "yes"; then BUILD_STR+="-tiff" fi if test "$build_fftw" = "yes"; then BUILD_STR+="-fftw3" fi if test "$build_hspell" = "yes"; then BUILD_STR+="-hspell" fi if test "$build_gtk" = "yes"; then BUILD_STR+="-gtk" fi AC_SUBST(BUILD_STR) AC_SUBST(VERSION) dnl ============================================================================ dnl output AC_CONFIG_FILES([ Makefile libhocr.pc libhocr-gtk.pc Doxyfile src/Makefile examples/Makefile examples/hocr/Makefile examples/hocr-gtk/Makefile examples/bindings/Makefile bindings/Makefile bindings/python/Makefile docs/Makefile docs/man/Makefile docs/man/man1/Makefile docs/man/man3/Makefile ]) AC_OUTPUT dnl print status echo echo $PACKAGE $VERSION - Hebrew Optical Character Recognition library echo OS: ${host} echo build: $BUILD_STR echo prefix: $prefix echo compiler: ${CC} echo have swig: ${have_swig} echo pkg-config path: ${PKG_CONFIG} echo echo with glib: ${build_glib} echo with gtk: ${build_gtk} echo with hspell: ${build_hspell} echo with libtiff: ${build_tiff} echo with fftw: ${build_fftw} echo echo build python binding, requires swig, libtiff, fftw: ${build_python} echo python site lib path: ${PY_MODULES_PATH} echo echo build hocr, requires glib, suggests gtk: ${build_hocr} echo build hocr-gtk, requires python bindings: ${build_hocr_gtk} echo libhocr-0.10.17/src/0000777000175000017500000000000011051630065011073 500000000000000libhocr-0.10.17/src/ho_recognize_nikud.h0000644000175000017500000000614111017002614015022 00000000000000 /*************************************************************************** * ho_recognize_nikud.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_recognize_nikud.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_RECOGNIZE_NIKUD_H #define HO_RECOGNIZE_NIKUD_H 1 #include #include #define HO_NIKUD_ARRAY_IN_SIZE 24 #define HO_NIKUD_ARRAY_OUT_SIZE 16 /* font shapes codes*/ static const char *ho_nikud_array[HO_NIKUD_ARRAY_OUT_SIZE] = { "", /* none */ "ָ", /* kamatz */ "ַ", /* patach */ "ֵ", /* tzere */ "ֶ", /* segol */ "ֹ", /* cholam */ "ּ", /* shorok */ "ֻ", /* kobotz */ "ִ", /* chirik */ "ְ", /* shva */ "ֱ", /* hataf segol */ "ֲ", /* hataf patach */ "ֳ", /* hataf kamatz */ "ּ", /* dagesh */ "ׁ", /* shin */ "ׂ" /* sin */ }; int ho_recognize_nikud_array_in_size (); int ho_recognize_nikud_array_out_size (); int ho_recognize_nikud_array_in (const ho_bitmap * m_nikud, const ho_bitmap * m_mask, double *array_in); int ho_recognize_nikud_array_out (const double *array_in, double *array_out, int font_code); const char *ho_recognize_array_out_to_nikud (const double *array_out); const char *ho_recognize_nikud (const ho_bitmap * m_nikud, const ho_bitmap * m_mask, int font_code, const char **dagesh, const char **shin); int ho_recognize_nikud_dimentions (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *height, double *width, double *top, double *bottom, double *top_left, double *top_mid, double *top_right, double *mid_left, double *mid_right, double *bottom_left, double *bottom_mid, double *bottom_right, double *dots_above, double *dots_below, double *dots_inside, double *objs_above, double *objs_below, double *objs_inside, double *main_obj_height, double *main_obj_width, double *top_dot_x, double *inside_dot_x, double *font_width_by_height); #endif /* HO_RECOGNIZE_NIKUD_H */ libhocr-0.10.17/src/ho_array.c0000644000175000017500000012612611051626206012771 00000000000000 /*************************************************************************** * ho_array.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifdef USE_FFTW #include #endif #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_pixbuf.h" #include "ho_array.h" #define square(x) ((x)*(x)) /** new ho_array @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @return newly allocated ho_array */ ho_array * ho_array_new (const int width, const int height) { int x, y; ho_array *pix = NULL; /* * allocate memory for pixbuf */ pix = (ho_array *) malloc (sizeof (ho_array)); if (!pix) { return NULL; } /* * read header */ pix->width = width; pix->height = height; /* * allocate memory for data */ pix->data = malloc (pix->height * pix->width * sizeof (double)); if (!(pix->data)) { free (pix); return NULL; } /* init value to 0 */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { (pix->data)[x + y * pix->width] = 0.0; } return pix; } /** clone ho_array @param m pointer to a ho_array image @return newly allocated gray ho_array */ ho_array * ho_array_clone (const ho_array * m) { ho_array *m_out = NULL; /* allocate memory */ m_out = ho_array_new (m->width, m->height); if (!m_out) return NULL; /* copy data */ memcpy (m_out->data, m->data, m_out->height * m_out->width * sizeof (double)); return m_out; } /** copy pixel data to a ho_array @param pix pointer to a ho_array image @param data the pixel data to copy @return false */ int ho_array_set_data (ho_array * pix, double data) { int x, y; for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) ho_array_set (pix, x, y, data); return FALSE; } /** copy pixel data to a ho_array @param pix pointer to a ho_array image @param data the pixel data to copy @param x the pixel x @param y the pixel y @return false */ int ho_array_set_at (ho_array * pix, int x, int y, double data) { ho_array_set (pix, x, y, data); return FALSE; } /** get pixel data from a ho_array @param pix pointer to a ho_array image @param x the pixel x @param y the pixel y @return false */ double ho_array_get_at (ho_array * pix, int x, int y) { return ho_array_get (pix, x, y); } /** new ho_array from ho_pixbuf @param pix pointer to an ho_array image @return newly allocated gray ho_array */ ho_array * ho_array_new_from_pixbuf (const ho_pixbuf * pix) { int x, y; double pixel_val; ho_array *m_out = NULL; ho_pixbuf *gray_pix = NULL; /* if pix is color convert to gray scale */ if (pix->n_channels > 1) gray_pix = ho_pixbuf_color_to_gray (pix); else gray_pix = ho_pixbuf_clone (pix); /* allocate memory */ m_out = ho_array_new (pix->width, pix->height); if (!m_out) return NULL; /* copy data */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { pixel_val = (double) ho_pixbuf_get (gray_pix, x, y, 0) / 255.0; ho_array_set (m_out, x, y, pixel_val); } /* free gray pix */ ho_pixbuf_free (gray_pix); return m_out; } /** new ho_array from ho_bitmap @param pix pointer to an ho_array image @return newly allocated gray ho_array */ ho_array * ho_array_new_from_bitmap (const ho_bitmap * pix) { int x, y; double pixel_val; ho_array *m_out = NULL; /* allocate memory */ m_out = ho_array_new (pix->width, pix->height); if (!m_out) return NULL; /* copy data */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { pixel_val = 1.0 - (double) ho_bitmap_get (pix, x, y); ho_array_set (m_out, x, y, pixel_val); } return m_out; } /** new gray ho_pixbuf from ho_array @param pix_in pointer the original array @return newly allocated gray ho_pixbuf */ ho_pixbuf * ho_array_to_pixbuf (const ho_array * pix_in) { int x, y; unsigned char pixel_val; ho_pixbuf *pix = NULL; double min, max, range; ho_array_minmax (pix_in, &min, &max); range = max - min; pix = ho_pixbuf_new (1, pix_in->width, pix_in->height, 0); if (!pix) return NULL; for (x = 0; x < pix_in->width; x++) for (y = 0; y < pix_in->height; y++) { pixel_val = (unsigned char) (255.0 * (ho_array_get (pix_in, x, y) - min) / range); ho_pixbuf_set (pix, x, y, 0, pixel_val); } return pix; } /** new rgb ho_pixbuf from ho_array @param pix_in pointer the original array @return newly allocated gray ho_pixbuf */ ho_pixbuf * ho_array_to_rgb_pixbuf (const ho_array * pix_in) { int x, y; unsigned char pixel_val; ho_pixbuf *pix = NULL; double min, max, range; ho_array_minmax (pix_in, &min, &max); range = max - min; pix = ho_pixbuf_new (3, pix_in->width, pix_in->height, 0); if (!pix) return NULL; for (x = 0; x < pix_in->width; x++) for (y = 0; y < pix_in->height; y++) { pixel_val = (unsigned char) (255.0 * (ho_array_get (pix_in, x, y) - min) / range); ho_pixbuf_set (pix, x, y, 0, pixel_val); ho_pixbuf_set (pix, x, y, 1, pixel_val); ho_pixbuf_set (pix, x, y, 2, pixel_val); } return pix; } /** free an ho_array @param pix pointer to an ho_array @return FALSE */ int ho_array_free (ho_array * pix) { if (!pix) return TRUE; if (pix->data) free (pix->data); free (pix); return FALSE; } /** get the min and max values in a array @param pix ho_array @param min a pointer to return the min @param max a pointer to return the max @return FALSE */ unsigned char ho_array_minmax (const ho_array * pix, double *min, double *max) { int x, y; *min = (pix->data)[0]; *max = (pix->data)[0]; for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { if (*min > (pix->data)[x + y * pix->width]) *min = (pix->data)[x + y * pix->width]; if (*max < (pix->data)[x + y * pix->width]) *max = (pix->data)[x + y * pix->width]; } return FALSE; } double ho_array_get_mean (const ho_array * pix) { double mean; int x, y; mean = 0; for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { mean += (pix->data)[x + y * pix->width]; } mean /= ((double) x * (double) y); return FALSE; } /** get the min value in a array @param pix ho_array @return min value */ double ho_array_get_min (const ho_array * ar) { double min, max; /* get min max values */ ho_array_minmax (ar, &min, &max); return min; } /** get the max value in a array @param pix ho_array @return max value */ double ho_array_get_max (const ho_array * ar) { double min, max; /* get min max values */ ho_array_minmax (ar, &min, &max); return max; } /** add two ho arrays @param ar1 left side ho_array @param ar2 right side ho_array @return FALSE */ unsigned char ho_array_add (ho_array * ar1, const ho_array * ar2) { int x, y; for (x = 0; x < ar1->width; x++) for (y = 0; y < ar1->height; y++) { (ar1->data)[x + y * ar1->width] += (ar2->data)[x + y * ar2->width]; } return FALSE; } /** add const to ho arrays @param ar left side ho_array @param num a number to add to array @return FALSE */ unsigned char ho_array_add_const (ho_array * ar, const double num) { int x, y; for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { (ar->data)[x + y * ar->width] += num; } return FALSE; } /** subtruct two ho arrays @param ar1 left side ho_array @param ar2 right side ho_array @return FALSE */ unsigned char ho_array_sub (ho_array * ar1, const ho_array * ar2) { int x, y; for (x = 0; x < ar1->width; x++) for (y = 0; y < ar1->height; y++) { (ar1->data)[x + y * ar1->width] -= (ar2->data)[x + y * ar2->width]; } return FALSE; } /** multiply two ho arrays @param ar1 left side ho_array @param ar2 right side ho_array @return FALSE */ unsigned char ho_array_mul (ho_array * ar1, const ho_array * ar2) { int x, y; for (x = 0; x < ar1->width; x++) for (y = 0; y < ar1->height; y++) { (ar1->data)[x + y * ar1->width] *= (ar2->data)[x + y * ar2->width]; } return FALSE; } /** multiply two ho real and imagenary ho_arrays pairs @param ar1_r left side ho_array real part @param ar1_i left side ho_array imagenaryl part @param ar2_r right side ho_array real part @param ar2_i right side ho_array imagenary part @return FALSE */ unsigned char ho_array_complex_mul (ho_array * ar1_r, ho_array * ar1_i, const ho_array * ar2_r, const ho_array * ar2_i) { int x, y; double a, b, c, d; for (x = 0; x < ar1_r->width; x++) for (y = 0; y < ar1_r->height; y++) { a = (ar1_r->data)[x + y * ar1_r->width]; b = (ar1_i->data)[x + y * ar1_i->width]; c = (ar2_r->data)[x + y * ar2_r->width]; d = (ar2_i->data)[x + y * ar2_i->width]; (ar1_r->data)[x + y * ar1_r->width] = a * c - b * d; (ar1_i->data)[x + y * ar1_i->width] = b * c + a * d; } return FALSE; } /** multiply const to ho arrays @param ar left side ho_array @param num a number to multiply to array @return FALSE */ unsigned char ho_array_mul_const (ho_array * ar, const double num) { int x, y; for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { (ar->data)[x + y * ar->width] *= num; } return FALSE; } /** divide two ho arrays @param ar1 left side ho_array @param ar2 right side ho_array @return FALSE */ unsigned char ho_array_div (ho_array * ar1, const ho_array * ar2) { int x, y; for (x = 0; x < ar1->width; x++) for (y = 0; y < ar1->height; y++) { (ar1->data)[x + y * ar1->width] /= (ar2->data)[x + y * ar2->width]; } return FALSE; } /** inverse ho array @param ar ho_array @return FALSE */ unsigned char ho_array_inv (ho_array * ar) { int x, y; for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { (ar->data)[x + y * ar->width] = 1.0 / (ar->data)[x + y * ar->width]; } return FALSE; } /** polerize ho array @param ar ho_array @return FALSE */ unsigned char ho_array_polerize (ho_array * ar, const double treshold) { int x, y; double min, max; double real_treshold; ho_array_minmax (ar, &min, &max); /* calculate threshold for this array */ real_treshold = min + treshold * (max - min); for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { if ((ar->data)[x + y * ar->width] < real_treshold) (ar->data)[x + y * ar->width] = 0.0; else (ar->data)[x + y * ar->width] = 1.0; } return FALSE; } /** do log (ho array + 1) @param ar ho_array @return FALSE */ unsigned char ho_array_log (ho_array * ar) { int x, y; for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { (ar->data)[x + y * ar->width] = log (1.0 + (ar->data)[x + y * ar->width]); } return FALSE; } /** streach 0..1 @param ar ho_array @return FALSE */ unsigned char ho_array_streach (ho_array * ar) { int x, y; double min, max, range; ho_array_minmax (ar, &min, &max); range = max - min; for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { (ar->data)[x + y * ar->width] = ((ar->data)[x + y * ar->width] - min) / range; } return FALSE; } /** histogram equalization 0..1 @param ar ho_array @return FALSE */ unsigned char ho_array_equl (ho_array * ar) { int i, x, y; int l, k; double min, max, range; double acc_hist[256]; double look_up_table[256]; /* clean accumulated histogram and look up table */ for (i = 0; i < 256; i++) acc_hist[i] = 0; for (i = 0; i < 256; i++) look_up_table[i] = 0; /* get min max values */ ho_array_minmax (ar, &min, &max); range = max - min; /* calc accum hist */ for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { i = (int) (255.0 * ((ar->data)[x + y * ar->width] - min) / range); acc_hist[i]++; } for (i = 1; i < 256; i++) acc_hist[i] += acc_hist[i - 1]; /* normelize accum hist */ for (i = 0; i < 256; i++) acc_hist[i] /= (double) (ar->width * ar->height); /* create a look up table */ l = 0; for (k = 0; k < 256; k++) { while ((255.0 * acc_hist[l]) < k && l < 256) l++; /* set convertion value for */ look_up_table[k] = (double) l / 255.0; } /* convert the array */ for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { i = (int) (255.0 * ((ar->data)[x + y * ar->width] - min) / range); (ar->data)[x + y * ar->width] = look_up_table[i]; } return FALSE; } /** convolution @param ar the ho_array to us for the convolution @param kerne a 3x3 kernel ho_array @return newly allocated ho array */ ho_array * ho_array_convolution_filter (const ho_array * ar, const ho_array * kernel) { int x, y; double sum; double neigbours[9]; ho_array *ar_out = NULL; /* allocate memory */ ar_out = ho_array_new (ar->width, ar->height); if (!ar_out) return NULL; /* copy data */ for (x = 0; x < ar->width; x++) { (ar_out->data)[x] = (ar->data)[x]; (ar_out->data)[x + (ar_out->height - 1) * ar_out->width] = (ar->data)[x + (ar->height - 1) * ar->width]; } for (y = 0; y < ar->height; y++) { (ar_out->data)[y * ar_out->width] = (ar->data)[y * ar->width]; (ar_out->data)[ar_out->width - 1 + y * ar_out->width] = (ar->data)[ar->width - 1 + y * ar->width]; } /* copy data */ for (x = 1; x < ar->width - 1; x++) for (y = 1; y < ar->height - 1; y++) { neigbours[0] = (ar->data)[(x - 1) + (y - 1) * ar->width]; neigbours[1] = (ar->data)[(x) + (y - 1) * ar->width]; neigbours[2] = (ar->data)[(x + 1) + (y - 1) * ar->width]; neigbours[3] = (ar->data)[(x - 1) + (y) * ar->width]; neigbours[4] = (ar->data)[(x) + (y) * ar->width]; neigbours[5] = (ar->data)[(x + 1) + (y) * ar->width]; neigbours[6] = (ar->data)[(x - 1) + (y + 1) * ar->width]; neigbours[7] = (ar->data)[(x) + (y + 1) * ar->width]; neigbours[8] = (ar->data)[(x + 1) + (y + 1) * ar->width]; sum = neigbours[0] * (kernel->data)[0] + neigbours[1] * (kernel->data)[1] + neigbours[2] * (kernel->data)[2] + neigbours[3] * (kernel->data)[3] + neigbours[4] * (kernel->data)[4] + neigbours[5] * (kernel->data)[5] + neigbours[6] * (kernel->data)[6] + neigbours[7] * (kernel->data)[7] + neigbours[8] * (kernel->data)[8]; (ar_out->data)[x + y * ar_out->width] = sum; } return ar_out; } /** median @param ar the ho_array to us for median filter @return newly allocated ho array */ ho_array * ho_array_median_filter (const ho_array * ar) { int i, j, x, y; int i_min; double median, max; double neigbours[9]; ho_array *ar_out = NULL; /* allocate memory */ ar_out = ho_array_new (ar->width, ar->height); if (!ar_out) return NULL; /* copy data */ for (x = 0; x < ar->width; x++) { (ar_out->data)[x] = (ar->data)[x]; (ar_out->data)[x + (ar_out->height - 1) * ar_out->width] = (ar->data)[x + (ar->height - 1) * ar->width]; } for (y = 0; y < ar->height; y++) { (ar_out->data)[y * ar_out->width] = (ar->data)[y * ar->width]; (ar_out->data)[ar_out->width - 1 + y * ar_out->width] = (ar->data)[ar->width - 1 + y * ar->width]; } /* copy data */ for (x = 1; x < ar->width - 1; x++) for (y = 1; y < ar->height - 1; y++) { neigbours[0] = (ar->data)[(x - 1) + (y - 1) * ar->width]; neigbours[1] = (ar->data)[(x) + (y - 1) * ar->width]; neigbours[2] = (ar->data)[(x + 1) + (y - 1) * ar->width]; neigbours[3] = (ar->data)[(x - 1) + (y) * ar->width]; neigbours[4] = (ar->data)[(x) + (y) * ar->width]; neigbours[5] = (ar->data)[(x + 1) + (y) * ar->width]; neigbours[6] = (ar->data)[(x - 1) + (y + 1) * ar->width]; neigbours[7] = (ar->data)[(x) + (y + 1) * ar->width]; neigbours[8] = (ar->data)[(x + 1) + (y + 1) * ar->width]; /* get max value */ max = neigbours[0]; for (i = 0; i < 9; i++) if (max < neigbours[i]) max = neigbours[i]; /* get median */ for (j = 0; j < 4; j++) { i_min = 0; for (i = 0; i < 9; i++) if (neigbours[i_min] > neigbours[i]) i_min = i; neigbours[i_min] = max; } median = max; for (i = 0; i < 9; i++) if (median > neigbours[i]) median = neigbours[i]; (ar_out->data)[x + y * ar_out->width] = median; } return ar_out; } /** max filter @param ar the ho_array to us for max filter @return newly allocated ho array */ ho_array * ho_array_max_filter (const ho_array * ar) { int i, x, y; double max; double neigbours[9]; ho_array *ar_out = NULL; /* allocate memory */ ar_out = ho_array_new (ar->width, ar->height); if (!ar_out) return NULL; /* copy data */ for (x = 0; x < ar->width; x++) { (ar_out->data)[x] = (ar->data)[x]; (ar_out->data)[x + (ar_out->height - 1) * ar_out->width] = (ar->data)[x + (ar->height - 1) * ar->width]; } for (y = 0; y < ar->height; y++) { (ar_out->data)[y * ar_out->width] = (ar->data)[y * ar->width]; (ar_out->data)[ar_out->width - 1 + y * ar_out->width] = (ar->data)[ar->width - 1 + y * ar->width]; } /* copy data */ for (x = 1; x < ar->width - 1; x++) for (y = 1; y < ar->height - 1; y++) { neigbours[0] = (ar->data)[(x - 1) + (y - 1) * ar->width]; neigbours[1] = (ar->data)[(x) + (y - 1) * ar->width]; neigbours[2] = (ar->data)[(x + 1) + (y - 1) * ar->width]; neigbours[3] = (ar->data)[(x - 1) + (y) * ar->width]; neigbours[4] = (ar->data)[(x) + (y) * ar->width]; neigbours[5] = (ar->data)[(x + 1) + (y) * ar->width]; neigbours[6] = (ar->data)[(x - 1) + (y + 1) * ar->width]; neigbours[7] = (ar->data)[(x) + (y + 1) * ar->width]; neigbours[8] = (ar->data)[(x + 1) + (y + 1) * ar->width]; /* get max value */ max = neigbours[0]; for (i = 1; i < 9; i++) if (max < neigbours[i]) max = neigbours[i]; (ar_out->data)[x + y * ar_out->width] = max; } return ar_out; } /** min filter @param ar the ho_array to us for min filter @return newly allocated ho array */ ho_array * ho_array_min_filter (const ho_array * ar) { int i, x, y; double min; double neigbours[9]; ho_array *ar_out = NULL; /* allocate memory */ ar_out = ho_array_new (ar->width, ar->height); if (!ar_out) return NULL; /* copy data */ for (x = 0; x < ar->width; x++) { (ar_out->data)[x] = (ar->data)[x]; (ar_out->data)[x + (ar_out->height - 1) * ar_out->width] = (ar->data)[x + (ar->height - 1) * ar->width]; } for (y = 0; y < ar->height; y++) { (ar_out->data)[y * ar_out->width] = (ar->data)[y * ar->width]; (ar_out->data)[ar_out->width - 1 + y * ar_out->width] = (ar->data)[ar->width - 1 + y * ar->width]; } /* copy data */ for (x = 1; x < ar->width - 1; x++) for (y = 1; y < ar->height - 1; y++) { neigbours[0] = (ar->data)[(x - 1) + (y - 1) * ar->width]; neigbours[1] = (ar->data)[(x) + (y - 1) * ar->width]; neigbours[2] = (ar->data)[(x + 1) + (y - 1) * ar->width]; neigbours[3] = (ar->data)[(x - 1) + (y) * ar->width]; neigbours[4] = (ar->data)[(x) + (y) * ar->width]; neigbours[5] = (ar->data)[(x + 1) + (y) * ar->width]; neigbours[6] = (ar->data)[(x - 1) + (y + 1) * ar->width]; neigbours[7] = (ar->data)[(x) + (y + 1) * ar->width]; neigbours[8] = (ar->data)[(x + 1) + (y + 1) * ar->width]; /* get max value */ min = neigbours[0]; for (i = 1; i < 9; i++) if (min > neigbours[i]) min = neigbours[i]; (ar_out->data)[x + y * ar_out->width] = min; } return ar_out; } /** absulute value @param ar1 left side ho_array @param ar2 right side ho_array @return newly allocated ho array */ ho_array * ho_array_complex_abs (const ho_array * ar1, const ho_array * ar2) { int x, y; ho_array *ar_out = NULL; /* allocate memory */ ar_out = ho_array_new (ar1->width, ar1->height); if (!ar_out) return NULL; /* copy data */ for (x = 0; x < ar1->width; x++) for (y = 0; y < ar1->height; y++) { (ar_out->data)[x + y * ar_out->width] = sqrt ((ar1->data)[x + y * ar1->width] * (ar1->data)[x + y * ar1->width] + (ar2->data)[x + y * ar2->width] * (ar2->data)[x + y * ar2->width]); } return ar_out; } /** atan2 @param ar1 left side ho_array @param ar2 right side ho_array @return newly allocated ho array */ ho_array * ho_array_complex_atan2 (const ho_array * ar1, const ho_array * ar2) { int x, y; ho_array *ar_out = NULL; /* allocate memory */ ar_out = ho_array_new (ar1->width, ar1->height); if (!ar_out) return NULL; /* copy data */ for (x = 0; x < ar1->width; x++) for (y = 0; y < ar1->height; y++) { (ar_out->data)[x + y * ar_out->width] = atan2 ((ar1->data)[x + y * ar1->width], (ar2->data)[x + y * ar2->width]); } return ar_out; } /** gradient @param ar the ho_array to us for gradient detection @param ar_r the r value of the gradient @param ar_theta the theta value of the gradient @return FALSE */ unsigned char ho_array_gradient (const ho_array * ar, ho_array * ar_r, ho_array * ar_theta) { int x, y; double sum_x, sum_y; double neigbours[9]; double sobol_x[] = { -1, 0, 1, -2, 0, 2, -1, 0, 1 }; double sobol_y[] = { 1, 2, 1, 0, 0, 0, -1, -2, -1 }; /* copy data */ for (x = 1; x < ar->width - 1; x++) for (y = 1; y < ar->height - 1; y++) { neigbours[0] = (ar->data)[(x - 1) + (y - 1) * ar->width]; neigbours[1] = (ar->data)[(x) + (y - 1) * ar->width]; neigbours[2] = (ar->data)[(x + 1) + (y - 1) * ar->width]; neigbours[3] = (ar->data)[(x - 1) + (y) * ar->width]; neigbours[4] = (ar->data)[(x) + (y) * ar->width]; neigbours[5] = (ar->data)[(x + 1) + (y) * ar->width]; neigbours[6] = (ar->data)[(x - 1) + (y + 1) * ar->width]; neigbours[7] = (ar->data)[(x) + (y + 1) * ar->width]; neigbours[8] = (ar->data)[(x + 1) + (y + 1) * ar->width]; sum_x = neigbours[0] * sobol_x[0] + neigbours[1] * sobol_x[1] + neigbours[2] * sobol_x[2] + neigbours[3] * sobol_x[3] + neigbours[4] * sobol_x[4] + neigbours[5] * sobol_x[5] + neigbours[6] * sobol_x[6] + neigbours[7] * sobol_x[7] + neigbours[8] * sobol_x[8]; sum_y = neigbours[0] * sobol_y[0] + neigbours[1] * sobol_y[1] + neigbours[2] * sobol_y[2] + neigbours[3] * sobol_y[3] + neigbours[4] * sobol_y[4] + neigbours[5] * sobol_y[5] + neigbours[6] * sobol_y[6] + neigbours[7] * sobol_y[7] + neigbours[8] * sobol_y[8]; /* calculate r and theta vlaues */ (ar_r->data)[x + y * ar_r->width] = sqrt ((sum_x * sum_x) + (sum_y * sum_y)); (ar_theta->data)[x + y * ar_theta->width] = atan2 (sum_y, sum_x); } return FALSE; } /** hough trasform for circles @param ar the ho_array to us for gradient detection @param min_radius the circles min radius @param max_radius the circles max radius @return FALSE */ ho_array * ho_array_hough_circles (const ho_array * ar, const int min_radius, const int max_radius, const unsigned char t) { int radius; double r, theta; double min, max; double threshold; double threshold_percent; int x, y; int xtag, ytag; ho_array *ar_out = NULL; ho_array *ar_r = NULL; ho_array *ar_theta = NULL; if (!t) threshold_percent = 0.1; else threshold_percent = t; /* allocate memory */ ar_out = ho_array_new (ar->width, ar->height); if (!ar_out) return NULL; ar_r = ho_array_new (ar->width, ar->height); if (!ar_r) { ho_array_free (ar_out); return NULL; } ar_theta = ho_array_new (ar->width, ar->height); if (!ar_theta) { ho_array_free (ar_out); ho_array_free (ar_r); return NULL; } /* get image gradient */ ho_array_gradient (ar, ar_r, ar_theta); /* get threshold values of ar_r */ ho_array_minmax (ar_r, &min, &max); threshold = min + threshold_percent * (max - min) / 100.0; /* transform data */ for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { r = ho_array_get (ar_r, x, y); theta = ho_array_get (ar_theta, x, y); /* if pixel is on in xy plane */ if (r > threshold) for (radius = min_radius; radius < max_radius; radius++) { xtag = x - (int) ((double) radius * cos (theta)); ytag = y + (int) ((double) radius * sin (theta)); /* check if xytag is in image */ if (ytag >= 0 && ytag < ar_r->height && xtag >= 0 && xtag < ar_r->width) { (ar_out->data)[xtag + ytag * ar_out->width] = (ar_out->data)[xtag + ytag * ar_out->width] + 1; } } } /* free mem */ ho_array_free (ar_theta); ho_array_free (ar_r); return ar_out; } /** hough trasform for lines @param ar the ho_array to use for gradient detection @return FALSE */ ho_array * ho_array_hough_lines (const ho_array * ar, const unsigned char t) { double r, theta; double min, max; double threshold; double threshold_percent; int x, y; int xtag, ytag; ho_array *ar_out = NULL; ho_array *ar_r = NULL; ho_array *ar_theta = NULL; if (!t) threshold_percent = 10; else threshold_percent = t; /* allocate memory */ ar_out = ho_array_new (ar->width, 180); if (!ar_out) return NULL; ar_r = ho_array_new (ar->width, ar->height); if (!ar_r) { ho_array_free (ar_out); return NULL; } ar_theta = ho_array_new (ar->width, ar->height); if (!ar_theta) { ho_array_free (ar_out); ho_array_free (ar_r); return NULL; } /* get image gradient */ ho_array_gradient (ar, ar_r, ar_theta); /* free mem */ ho_array_free (ar_theta); /* get threshold values of ar_r */ ho_array_minmax (ar_r, &min, &max); threshold = min + threshold_percent * (max - min) / 100.0; /* transform data */ for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { r = ho_array_get (ar_r, x, y); /* if pixel is on in xy plane */ if (r > threshold) for (ytag = 0; ytag < 180; ytag++) { theta = M_PI * (double) ytag / 180.0; xtag = ar_out->width / 2 + (int) ((double) x * cos (theta) + (double) y * sin (theta)); /* check if xytag is in image */ if (xtag >= 0 && xtag < ar_out->width) { (ar_out->data)[xtag + ytag * ar_out->width] = (ar_out->data)[xtag + ytag * ar_out->width] + 1; } } } /* free mem */ ho_array_free (ar_r); return ar_out; } /** backwords hough trasform for lines @param ar the ho_array to use for backword hough @param width the array height @param height the array height @return FALSE */ ho_array * ho_array_hough_lines_backwords (const ho_array * ar, const int width, const int height, const unsigned char t) { int x, y; double min, max; double threshold; double threshold_percent; int xtag, ytag; double theta, a, b; ho_array *ar_out = NULL; if (!t) threshold_percent = 40; else threshold_percent = t; /* allocate memory */ ar_out = ho_array_new (width, height); if (!ar_out) return NULL; /* get threshold values of ar */ ho_array_minmax (ar, &min, &max); threshold = min + threshold_percent * (max - min) / 100.0; /* transform data */ for (x = 0; x < ar->width; x++) { for (y = 45; y < 135; y++) { /* if pixel is on in xy plane */ if (ho_array_get (ar, x, y) > threshold) { theta = M_PI * (double) y / 180.0; a = -cos (theta) / sin (theta); b = (double) (x - ar->width / 2) / sin (theta); /* draw a line */ for (xtag = 0; xtag < width; xtag++) { ytag = (int)(a * (double)xtag + b) + ar->width / 2; /* check if xytag is in image */ if (ytag >= 0 && ytag < ar_out->height) { (ar_out->data)[xtag + ytag * ar_out->width] = (ar_out->data)[xtag + ytag * ar_out->width] + 1; } } } } for (y = 1; y < 45; y++) { /* if pixel is on in xy plane */ if (ho_array_get (ar, x, y) > threshold && y != 90) { theta = M_PI * (double) y / 180.0; a = -sin (theta) / cos (theta); b = (double) (x - ar->width / 2) / cos (theta); /* draw a line */ for (ytag = 0; ytag < height; ytag++) { xtag = (int)(a * (double)ytag + b); /* check if xytag is in image */ if (xtag >= 0 && xtag < ar_out->width) { (ar_out->data)[xtag + ytag * ar_out->width] = (ar_out->data)[xtag + ytag * ar_out->width] + 1; } } } } for (y = 135; y < 180; y++) { /* if pixel is on in xy plane */ if (ho_array_get (ar, x, y) > threshold && y != 90) { theta = M_PI * (double) y / 180.0; a = -sin (theta) / cos (theta); b = (double) (x - ar->width / 2) / cos (theta); /* draw a line */ for (ytag = 0; ytag < height; ytag++) { xtag = (int)(a * (double)ytag + b); /* check if xytag is in image */ if (xtag >= 0 && xtag < ar_out->width) { (ar_out->data)[xtag + ytag * ar_out->width] = (ar_out->data)[xtag + ytag * ar_out->width] + 1; } } } } } return ar_out; } /** backwords hough trasform for lines by angle @param ar the ho_array to use for backword hough @param width the array height @param height the array height @param angle1 start line angle @param angle2 end line angle @return FALSE */ ho_array * ho_array_hough_lines_backwords_by_angle (const ho_array * ar, const int width, const int height, const int angle1, const int angle2) { int x, y; int xtag, ytag; double theta, a, b; ho_array *ar_out = NULL; /* check if this is a vertical angle */ if (angle1 > 45 && angle1 < 135) return ho_array_hough_lines_backwords_by_angle_v (ar, width, height, angle1, angle2); /* allocate memory */ ar_out = ho_array_new (width, height); if (!ar_out) return NULL; /* transform data */ for (x = 0; x < ar->width; x++) { for (y = angle1; y < angle2; y++) { /* if pixel is on in xy plane */ if (ho_array_get (ar, x, y) > 0.5) { /* FIXME: this is only good for ~horizontal lines */ theta = M_PI * (double) y / 180.0; a = -cos (theta) / sin (theta); b = (double) (x - ar->width / 2) / sin (theta); /* draw a line */ for (xtag = 0; xtag < width; xtag++) { ytag = a * x + b; /* check if xytag is in image */ if (ytag >= 0 && ytag < ar_out->height) { (ar_out->data)[xtag + ytag * ar_out->width] = (ar_out->data)[xtag + ytag * ar_out->width] + 1; } } } } } return ar_out; } /** backwords hough trasform for lines by angle @param ar the ho_array to use for backword hough @param width the array height @param height the array height @param angle1 start line angle @param angle2 end line angle @return FALSE */ ho_array * ho_array_hough_lines_backwords_by_angle_v (const ho_array * ar, const int width, const int height, const int angle1, const int angle2) { int x, y; int xtag, ytag; double theta, a, b; ho_array *ar_out = NULL; /* allocate memory */ ar_out = ho_array_new (width, height); if (!ar_out) return NULL; /* transform data */ for (x = 0; x < ar->width; x++) { for (y = angle1; y < angle2; y++) { /* if pixel is on in xy plane */ if (y != 90 && ho_array_get (ar, x, y) > 0.5) { /* FIXME: this is only good for ~vertical lines */ theta = M_PI * (double) y / 180.0; a = -sin (theta) / cos (theta); b = (double) (x - ar->width / 2) / cos (theta); /* draw a line */ for (ytag = 0; ytag < height; ytag++) { xtag = a * y + b; /* check if xytag is in image */ if (xtag >= 0 && xtag < ar_out->width) { (ar_out->data)[xtag + ytag * ar_out->width] = (ar_out->data)[xtag + ytag * ar_out->width] + 1; } } } } } return ar_out; } const ho_array * ho_array_pnm_load (const char *filename) { ho_pixbuf *pix; ho_array *ar; pix = ho_pixbuf_pnm_load (filename); if (!pix) return NULL; ar = ho_array_new_from_pixbuf (pix); ho_pixbuf_free (pix); return ar; } int ho_array_pnm_save (const ho_array * ar, const char *filename) { ho_pixbuf *pix; pix = ho_array_to_pixbuf (ar); if (!pix) return TRUE; ho_pixbuf_pnm_save (pix, filename); ho_pixbuf_free (pix); return FALSE; } #ifdef USE_TIFF const ho_array * ho_array_tiff_load (const char *filename) { ho_pixbuf *pix; ho_array *ar; pix = ho_pixbuf_bw_tiff_load (filename); if (!pix) return NULL; ar = ho_array_new_from_pixbuf (pix); ho_pixbuf_free (pix); return ar; } int ho_array_tiff_save (const ho_array * ar, const char *filename) { ho_pixbuf *pix; pix = ho_array_to_pixbuf (ar); if (!pix) return TRUE; ho_pixbuf_bw_tiff_save (pix, filename); ho_pixbuf_free (pix); return FALSE; } #endif /* USE_TIFF */ #ifdef USE_FFTW /** fft_forword @param ar the ho_array to us for fft @param ar_re the output real values @param ar_im the output imaginary values @return FALSE */ unsigned char ho_array_fft_forword (const ho_array * ar, ho_array * ar_r, ho_array * ar_im) { unsigned int i; int width, height; fftw_plan plan; fftw_complex *fft_ar_xy; fftw_complex *fft_ar_w; width = ar->width; height = ar->height; fft_ar_xy = fftw_malloc (sizeof (fftw_complex) * width * height); fft_ar_w = fftw_malloc (sizeof (fftw_complex) * width * height); /* copy data to fftw array */ for (i = 0; i < width * height; i++) { fft_ar_xy[i][0] = (ar->data)[i]; fft_ar_xy[i][1] = 0.0f; } /* calculate the implementation plan */ plan = fftw_plan_dft_2d (height, width, fft_ar_xy, fft_ar_w, FFTW_FORWARD, FFTW_ESTIMATE); /* perform on the Fourier transform */ fftw_execute (plan); /* copy results to output arrays */ for (i = 0; i < width * height; i++) { (ar_r->data)[i] = fft_ar_w[i][0]; (ar_im->data)[i] = fft_ar_w[i][1]; } /* free fft objects */ fftw_destroy_plan (plan); fftw_free (fft_ar_xy); fftw_free (fft_ar_w); return FALSE; } /** fft_backword @param ar_re input array of the real values @param ar_im input array of the imaginary values @param ar the output ho_array @return FALSE */ unsigned char ho_array_fft_backword (const ho_array * ar_r, const ho_array * ar_im, ho_array * ar) { unsigned int i; int width, height; fftw_plan plan; fftw_complex *fft_ar_xy; fftw_complex *fft_ar_w; width = ar->width; height = ar->height; fft_ar_xy = fftw_malloc (sizeof (fftw_complex) * width * height); fft_ar_w = fftw_malloc (sizeof (fftw_complex) * width * height); /* copy data to fftw array */ for (i = 0; i < width * height; i++) { fft_ar_w[i][0] = (ar_r->data)[i]; fft_ar_w[i][1] = (ar_im->data)[i]; } /* calculate the implementation plan */ plan = fftw_plan_dft_2d (height, width, fft_ar_w, fft_ar_xy, FFTW_BACKWARD, FFTW_ESTIMATE); /* perform on the Fourier transform */ fftw_execute (plan); /* copy results to output arrays */ for (i = 0; i < width * height; i++) { (ar->data)[i] = sqrt (square (fft_ar_xy[i][0]) + square (fft_ar_w[i][0])); } /* free fft objects */ fftw_destroy_plan (plan); fftw_free (fft_ar_xy); fftw_free (fft_ar_w); return FALSE; } /** fft_shift @param ar_re input array of the real values @param ar_im input array of the imaginary values @param shift_ar_re output array of the real values @param shift_ar_im output array of the imaginary values @return FALSE */ unsigned char ho_array_fft_shift (const ho_array * ar_r, const ho_array * ar_im, ho_array * shift_ar_r, ho_array * shift_ar_im) { int x, y, xtag, ytag; /* copy data */ for (x = 0; x < ar_r->width; x++) for (y = 0; y < ar_r->height; y++) { xtag = (x + ar_r->width / 2) % ar_r->width; ytag = (y + ar_r->height / 2) % ar_r->height; (shift_ar_r->data)[x + y * ar_r->width] = (ar_r->data)[xtag + ytag * ar_r->width]; (shift_ar_im->data)[x + y * ar_r->width] = (ar_im->data)[xtag + ytag * ar_r->width]; } return FALSE; } /** fft_filter - applay a filter in w space @param ar input array @param ar_filter input array of the imaginary values @return FALSE */ unsigned char ho_array_fft_filter (ho_array * ar, const ho_array * ar_filter) { int w, h; ho_array *ar_shift; ho_array *ar_r; ho_array *ar_im; ho_array *ar_filter_r; ho_array *ar_filter_im; /* get memory */ w = ar->width; h = ar->height; ar_shift = ho_array_new (w, h); ar_r = ho_array_new (w, h); ar_im = ho_array_new (w, h); ar_filter_r = ho_array_new (w, h); ar_filter_im = ho_array_new (w, h); /* FIXME: free memory */ if (!ar_shift || !ar_r || !ar_im || !ar_filter_r || !ar_filter_im) return TRUE; /* shift ar to ar_shift FIXME: ar_im,ar_filter_im are just place holders */ ho_array_fft_shift (ar, ar_im, ar_shift, ar_filter_im); /* move to w space */ ho_array_fft_forword (ar_shift, ar_r, ar_im); ho_array_free (ar_shift); ho_array_fft_forword (ar_filter, ar_filter_r, ar_filter_im); /* applay filter */ ho_array_complex_mul (ar_r, ar_im, ar_filter_r, ar_filter_im); /* move to xy space */ ho_array_fft_backword (ar_r, ar_im, ar); /* free memory */ ho_array_free (ar_r); ho_array_free (ar_im); ho_array_free (ar_filter_r); ho_array_free (ar_filter_im); return FALSE; } /** fft_filter - applay a box filter in w space @param ar input array @param box_height height of box @param box_width width of box @return FALSE */ unsigned char ho_array_fft_filter_box (ho_array * ar, const int box_width, const int box_height) { unsigned char return_value; ho_array *ar_filter = NULL; /* create a filter */ ar_filter = ho_array_new_box (ar->width, ar->height, box_width, box_height); if (!ar_filter) return TRUE; /* aplay filter */ return_value = ho_array_fft_filter (ar, ar_filter); /* free filter */ ho_array_free (ar_filter); return return_value; } /** fft_filter - applay a circle filter in w space @param ar input array @param radius radius of circle @return FALSE */ unsigned char ho_array_fft_filter_circle (ho_array * ar, const int radius) { unsigned char return_value; ho_array *ar_filter = NULL; /* create a filter */ ar_filter = ho_array_new_circle (ar->width, ar->height, radius); if (!ar_filter) return TRUE; /* aplay filter */ return_value = ho_array_fft_filter (ar, ar_filter); /* free filter */ ho_array_free (ar_filter); return return_value; } /** fft_filter - applay a gaussien filter in w space @param ar input array @param sigma of gaussien @return FALSE */ unsigned char ho_array_fft_filter_gaussien (ho_array * ar, const double sigma) { unsigned char return_value; ho_array *ar_filter = NULL; /* create a filter */ ar_filter = ho_array_new_gaussien (ar->width, ar->height, sigma); if (!ar_filter) return TRUE; /* aplay filter */ return_value = ho_array_fft_filter (ar, ar_filter); /* free filter */ ho_array_free (ar_filter); return return_value; } #endif /* USE_FFTW */ /** new ho_array init to gaussian @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @param sigma the sigma to use in the gaussien @return newly allocated ho_array */ ho_array * ho_array_new_gaussien (const int width, const int height, const double sigma) { int x, y; ho_array *pix = NULL; /* * allocate memory for pixbuf */ pix = (ho_array *) malloc (sizeof (ho_array)); if (!pix) { return NULL; } /* * read header */ pix->width = width; pix->height = height; /* * allocate memory for data */ pix->data = malloc (pix->height * pix->width * sizeof (double)); if (!(pix->data)) { free (pix); return NULL; } /* init value to 0 */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { (pix->data)[x + y * pix->width] = exp (-square (sigma) * (square (x - width / 2.0) + square (y - height / 2.0)) / (2.0)); } return pix; } /** new ho_array init to box @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @param box_height height of box @param box_width width of box @return newly allocated ho_array */ ho_array * ho_array_new_box (const int width, const int height, const int box_width, const int box_height) { int x, y; ho_array *pix = NULL; /* * allocate memory for pixbuf */ pix = (ho_array *) malloc (sizeof (ho_array)); if (!pix) { return NULL; } /* * read header */ pix->width = width; pix->height = height; /* * allocate memory for data */ pix->data = malloc (pix->height * pix->width * sizeof (double)); if (!(pix->data)) { free (pix); return NULL; } /* init value to 0 */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { (pix->data)[x + y * pix->width] = x > (width - box_width) / 2 && x < (width + box_width) / 2 && y > (height - box_height) / 2 && y < (height + box_height) / 2; } return pix; } /** new ho_array init to circle @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @param radius radius of circle @return newly allocated ho_array */ ho_array * ho_array_new_circle (const int width, const int height, const int radius) { int x, y; ho_array *pix = NULL; /* * allocate memory for pixbuf */ pix = (ho_array *) malloc (sizeof (ho_array)); if (!pix) { return NULL; } /* * read header */ pix->width = width; pix->height = height; /* * allocate memory for data */ pix->data = malloc (pix->height * pix->width * sizeof (double)); if (!(pix->data)) { free (pix); return NULL; } /* init value to 0 */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { (pix->data)[x + y * pix->width] = (square (x - width / 2.0) + square (y - height / 2.0)) < square (radius); } return pix; } libhocr-0.10.17/src/ho_objmap.c0000644000175000017500000006463711051626163013135 00000000000000 /*************************************************************************** * ho_objmap.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_dimentions.h" #include "ho_objmap.h" ho_objlist * ho_objlist_new () { ho_objlist *new_hocr_object_list; /* allocate memory for struct */ new_hocr_object_list = (ho_objlist *) malloc (sizeof (ho_objlist)); /* check for new memory */ if (!new_hocr_object_list) return NULL; /* init struct values */ new_hocr_object_list->size = 0; new_hocr_object_list->allocated_size = 1000; /* allocate memory for objects */ new_hocr_object_list->objects = (ho_obj *) malloc (sizeof (ho_obj) * new_hocr_object_list->allocated_size); /* if no memeory for objects free the struct */ if (!new_hocr_object_list->objects) { free (new_hocr_object_list); return NULL; } return new_hocr_object_list; } int ho_objlist_free (ho_objlist * object_list) { if (!object_list) return TRUE; /* free the text */ if (object_list->objects) free (object_list->objects); /* free the struct */ free (object_list); return FALSE; } int ho_objlist_add (ho_objlist * object_list, double weight, int x, int y, int width, int height) { ho_obj *new_object_list_objects; if ((object_list->size + 1) > 2000000000) return TRUE; /* check for allocated space and try to get more memory */ if ((object_list->size + 1) >= object_list->allocated_size) { new_object_list_objects = (ho_obj *) realloc (object_list->objects, sizeof (ho_obj) * (object_list->allocated_size + 1000)); /* got new memory */ if (new_object_list_objects) { object_list->objects = new_object_list_objects; object_list->allocated_size += 1000; } /* did not get new memory */ else { return TRUE; } } /* add the new object */ (object_list->objects)[object_list->size].index = object_list->size; (object_list->objects)[object_list->size].reading_index = object_list->size; (object_list->objects)[object_list->size].weight = weight; (object_list->objects)[object_list->size].x = x; (object_list->objects)[object_list->size].y = y; (object_list->objects)[object_list->size].height = height; (object_list->objects)[object_list->size].width = width; (object_list->size)++; return FALSE; } int ho_objlist_get_index (ho_objlist * object_list, int index) { while ((object_list->objects)[index].index != index) index = (object_list->objects)[index].index; return index; } ho_obj * ho_objlist_get_object (ho_objlist * object_list, int index) { return &((object_list->objects)[index]); } int ho_objlist_add_pixel (ho_objlist * object_list, int index, int x, int y) { int x1 = (object_list->objects)[index].x; int x2 = (object_list->objects)[index].x + (object_list->objects)[index].width; int y1 = (object_list->objects)[index].y; int y2 = (object_list->objects)[index].y + (object_list->objects)[index].height; (object_list->objects)[index].weight++; if (x1 > x) x1 = x; if (y1 > y) y1 = y; if (x2 <= x) x2 = x + 1; if (y2 <= y) y2 = y + 1; (object_list->objects)[index].x = x1; (object_list->objects)[index].y = y1; (object_list->objects)[index].height = y2 - y1; (object_list->objects)[index].width = x2 - x1; return FALSE; } int ho_objlist_link (ho_objlist * object_list, int index1, int index2) { int index; int x11, x12, y11, y12; int x21, x22, y21, y22; /* just checking :-) */ if (index1 == index2) return TRUE; /* always use the lower index */ if (index2 < index1) { index = index1; index1 = index2; index2 = index; } /* set object1 extentions */ x11 = (object_list->objects)[index1].x; x12 = (object_list->objects)[index1].x + (object_list->objects)[index1].width; y11 = (object_list->objects)[index1].y; y12 = (object_list->objects)[index1].y + (object_list->objects)[index1].height; /* set object2 extentions */ x21 = (object_list->objects)[index2].x; x22 = (object_list->objects)[index2].x + (object_list->objects)[index2].width; y21 = (object_list->objects)[index2].y; y22 = (object_list->objects)[index2].y + (object_list->objects)[index2].height; /* adjust index2 index */ (object_list->objects)[index2].index = index1; /* adjust index1 weight */ (object_list->objects)[index1].weight += (object_list->objects)[index2].weight; /* adjust index1 object cordiants */ if (x21 < x11) x11 = x21; if (y21 < y11) y11 = y21; if (x22 > x12) x12 = x22; if (y22 > y12) y12 = y22; (object_list->objects)[index1].x = x11; (object_list->objects)[index1].y = y11; (object_list->objects)[index1].height = (y12 - y11); (object_list->objects)[index1].width = (x12 - x11); return FALSE; } int ho_objlist_clean (ho_objlist * object_list, int **map) { ho_objlist *temp_object_list; int new_index, i; /* allocate temporary list */ temp_object_list = ho_objlist_new (); if (!temp_object_list) return TRUE; *map = (int *) calloc (object_list->size, sizeof (int)); if (!(*map)) { ho_objlist_free (temp_object_list); return TRUE; } /* copy only valid objects to temporary list */ new_index = 0; for (i = 0; i < (object_list->size); i++) { /* this index does not point to anything */ (*map)[i] = 0; if ((object_list->objects)[i].index == i) { ho_objlist_add (temp_object_list, ((object_list->objects)[i]).weight, ((object_list->objects)[i]).x, ((object_list->objects)[i]).y, ((object_list->objects)[i]).width, ((object_list->objects)[i]).height); /* this index point to a new index */ (*map)[i] = new_index; /* increas index */ new_index++; } } /* copy back objects from temporary list */ object_list->size = 0; for (i = 0; i < (temp_object_list->size); i++) { ho_objlist_add (object_list, ((temp_object_list->objects)[i]).weight, ((temp_object_list->objects)[i]).x, ((temp_object_list->objects)[i]).y, ((temp_object_list->objects)[i]).width, ((temp_object_list->objects)[i]).height); } /* unref the temporary list */ ho_objlist_free (temp_object_list); return FALSE; } int ho_objlist_clean_by_reading_index (ho_objlist * object_list, int **map) { ho_objlist *temp_object_list; int new_index, i, j; /* allocate temporary list */ temp_object_list = ho_objlist_new (); if (!temp_object_list) return TRUE; *map = (int *) calloc (object_list->size, sizeof (int)); if (!(*map)) { ho_objlist_free (temp_object_list); return TRUE; } /* map by reading index */ new_index = 0; for (i = 0; i < (object_list->size); i++) { for (j = 0; j < (object_list->size); j++) if ((object_list->objects)[j].reading_index == i) { /* this index is this reading order */ (*map)[j] = i; ho_objlist_add (temp_object_list, ((object_list->objects)[j]).weight, ((object_list->objects)[j]).x, ((object_list->objects)[j]).y, ((object_list->objects)[j]).width, ((object_list->objects)[j]).height); } } /* copy back objects from temporary list */ object_list->size = 0; for (i = 0; i < (temp_object_list->size); i++) { ho_objlist_add (object_list, ((temp_object_list->objects)[i]).weight, ((temp_object_list->objects)[i]).x, ((temp_object_list->objects)[i]).y, ((temp_object_list->objects)[i]).width, ((temp_object_list->objects)[i]).height); } /* unref the temporary list */ ho_objlist_free (temp_object_list); return FALSE; } int ho_objlist_print (ho_objlist * object_list) { int i; printf ("list has %d objects\n---w\th\tw\n---\n", object_list->size); for (i = 1; i < (object_list->size); i++) { printf ("%0.0f\t%d\t%d\n", ((object_list->objects)[i]).weight, ((object_list->objects)[i]).height, ((object_list->objects)[i]).width); } return FALSE; } int ho_objlist_statistics (ho_objlist * object_list, int min_height, int max_height, int min_width, int max_width, int *counter, double *weight_avg, double *weight_com, double *weight_min, double *weight_max, int *height_avg, int *height_com, int *height_min, int *height_max, int *width_avg, int *width_com, int *width_min, int *width_max) { /* historam boxes are 0 .. 300 -> 0 .. 60 (5 values into 1 histogram box) for * 1D attributes and 0 .. 1500 -> 0 .. 60 (25 into 1) for 2D attributes */ double weight_histogram[60]; int height_histogram[60]; int width_histogram[60]; double weight; double weight_sum; int height; double height_sum; int width; double width_sum; int i, histogram_index; int histogram_index_weight = 0; int histogram_index_height = 0; int histogram_index_width = 0; /* clean histograms */ for (i = 0; i < 60; i++) { weight_histogram[i] = 0.0; height_histogram[i] = 0; width_histogram[i] = 0; } /* clean initial sum, min and max values */ weight = ((object_list->objects)[0]).weight; width = ((object_list->objects)[0]).width; height = ((object_list->objects)[0]).height; *weight_min = *weight_max = weight_sum = weight; *width_min = *width_max = width_sum = width; *height_min = *height_max = height_sum = height; (*counter) = 0; for (i = 1; i < (object_list->size); i++) { /* get values */ weight = ((object_list->objects)[i]).weight; width = ((object_list->objects)[i]).width; height = ((object_list->objects)[i]).height; if (width > min_width && width < max_width && height > min_height && height < max_height) { (*counter)++; /* set min max and sum */ weight_sum += weight; if ((*weight_min) > weight) *weight_min = weight; if ((*weight_max) < weight) *weight_max = weight; width_sum += width; if ((*width_min) > width) *width_min = width; if ((*width_max) < width) *width_max = width; height_sum += height; if ((*height_min) > height) *height_min = height; if ((*height_max) < height) *height_max = height; /* set histograms */ histogram_index = weight / 25; if (histogram_index < 60) (weight_histogram[histogram_index])++; histogram_index = height / 5; if (histogram_index < 60) (height_histogram[histogram_index])++; histogram_index = width / 5; if (histogram_index < 60) (width_histogram[histogram_index])++; } } /* set average values */ if (*counter) { *weight_avg = weight_sum / (*counter); *height_avg = height_sum / (*counter); *width_avg = width_sum / (*counter); } /* set common values */ for (i = 0; i < 60; i++) { if (weight_histogram[histogram_index_weight] < weight_histogram[i]) histogram_index_weight = i; if (height_histogram[histogram_index_height] < height_histogram[i]) histogram_index_height = i; if (width_histogram[histogram_index_width] < width_histogram[i]) histogram_index_width = i; } /* set common values */ *weight_com = (double) histogram_index_weight *25.0 + 12; *height_com = histogram_index_height * 5 + 2; *width_com = histogram_index_width * 5 + 2; /* if fond some common height & width values fine-tune the height & width */ if (height_histogram[histogram_index_height] > 0) { /* empty the height & width histogram */ for (i = 0; i < 60; i++) { height_histogram[i] = 0; width_histogram[i] = 0; } for (i = 1; i < (object_list->size); i++) { /* get values */ height = ((object_list->objects)[i]).height; width = ((object_list->objects)[i]).width; if (width > min_width && width < max_width && height > min_height && height < max_height) { /* check for common only height */ if (height >= (*height_com) - 2 && height <= (*height_com) + 2) { (height_histogram[height - (*height_com) + 2])++; } /* check for common only width */ if (width >= (*width_com) - 2 && width <= (*width_com) + 2) { (width_histogram[width - (*width_com) + 2])++; } } } /* re-set common values */ histogram_index_height = 0; histogram_index_width = 0; for (i = 0; i < 5; i++) { if (height_histogram[histogram_index_height] < height_histogram[i]) histogram_index_height = i; if (width_histogram[histogram_index_width] < width_histogram[i]) histogram_index_width = i; } /* re-set height common values */ *height_com = histogram_index_height + (*height_com) - 2; *width_com = histogram_index_width + (*width_com) - 2; } return FALSE; } ho_objmap * ho_objmap_new (const int width, const int height) { ho_objmap *m_new = NULL; /* * allocate memory for pixbuf */ m_new = (ho_objmap *) malloc (sizeof (ho_objmap)); if (!m_new) { return NULL; } /* read header */ m_new->x = 0; m_new->y = 0; m_new->width = width; m_new->height = height; /* allocate memory for data (and set to zero) */ m_new->map = (int *) calloc (m_new->height * m_new->width, sizeof (int)); if (!(m_new->map)) { free (m_new); return NULL; } /* allocate initial object list */ m_new->obj_list = ho_objlist_new (); if (!(m_new->obj_list)) { free (m_new->map); free (m_new); return NULL; } return m_new; } int ho_objmap_free (ho_objmap * m) { if (!m) return TRUE; ho_objlist_free (m->obj_list); if (m->map) free (m->map); free (m); return FALSE; } int ho_objmap_clean (ho_objmap * m) { int x, y, k; int index; int *map = NULL; /* relax the object matrix */ for (x = 0; x < m->width; x++) for (y = 0; y < m->height; y++) { k = ho_objmap_get (m, x, y); if (k) { index = ho_objlist_get_index ((m->obj_list), k - 1); ho_objmap_set (m, x, y, index + 1); } } /* clean the object list */ ho_objlist_clean ((m->obj_list), &map); /* re relax the object matrix */ for (x = 0; x < m->width; x++) for (y = 0; y < m->height; y++) { k = ho_objmap_get (m, x, y); if (k) { index = map[k - 1]; ho_objmap_set (m, x, y, index + 1); } } /* free all temporary memory */ if (map) free (map); return FALSE; } int ho_objmap_sort_by_reading_index (ho_objmap * m, const unsigned char col, const unsigned char dir_ltr) { int x, y, k; int index; int *map = NULL; /* make sure reading order is set */ ho_objmap_update_reading_index (m, col, dir_ltr); /* clean the object list */ ho_objlist_clean_by_reading_index ((m->obj_list), &map); /* re relax the object matrix */ for (x = 0; x < m->width; x++) for (y = 0; y < m->height; y++) { k = ho_objmap_get (m, x, y); if (k) { index = map[k - 1]; ho_objmap_set (m, x, y, index + 1); } } /* free all temporary memory */ if (map) free (map); return FALSE; } ho_objmap * ho_objmap_new_from_bitmap (const ho_bitmap * bit_in) { ho_objmap *m_new = NULL; int x, y, k; double sum; double neigbors[4]; int min; int indexes[4]; /* allocate memory */ m_new = ho_objmap_new (bit_in->width, bit_in->height); if (!m_new) return NULL; m_new->x = bit_in->x; m_new->y = bit_in->y; /* link all concted black pixels */ for (x = 1; x < bit_in->width; x++) for (y = 1; y < (bit_in->height - 1); y++) { /* is pixel black ? */ if (ho_bitmap_get (bit_in, x, y)) { /* get neigbors */ neigbors[0] = ho_objmap_get (m_new, x - 1, y - 1); neigbors[1] = ho_objmap_get (m_new, x - 1, y - 0); neigbors[2] = ho_objmap_get (m_new, x - 1, y + 1); neigbors[3] = ho_objmap_get (m_new, x - 0, y - 1); sum = neigbors[0] + neigbors[1] + neigbors[2] + neigbors[3]; /* if no neigbor is black */ if (sum == 0) { if (ho_objlist_add ((m_new->obj_list), 1, x, y, 1, 1)) { /* can't add to objects :-( */ ho_objmap_free (m_new); return NULL; } /* in the matrix we insert index+1 */ ho_objmap_set (m_new, x, y, (m_new->obj_list)->size); } /* at least one neigbor is black */ else { /* find the index of the minimal frind */ min = 0; for (k = 0; k < 4; k++) { if (neigbors[k]) { indexes[k] = ho_objlist_get_index ((m_new->obj_list), neigbors[k] - 1); if (!min || (indexes[k] < (min - 1))) /* indexes goes 0.. and min goes 1.. */ min = (indexes[k] + 1); } else indexes[k] = 0; } /* min 1.. -> 0.. */ min--; /* set the current pixel in the objects matrix to that index */ ho_objmap_set (m_new, x, y, min + 1); ho_objlist_add_pixel ((m_new->obj_list), min, x, y); /* link all object to that index */ for (k = 0; k < 4; k++) { if (indexes[k]) ho_objlist_link ((m_new->obj_list), min, indexes[k]); } } } } /* relax and clean the objmap */ ho_objmap_clean (m_new); return m_new; } int ho_objmap_font_metrix (const ho_objmap * m, const int min_height, const int max_height, const int min_width, const int max_width, int *height, int *width, unsigned char *nikud) { int counter; double weight_avg; double weight_com; double weight_min; double weight_max; int height_avg; int height_com; int height_min; int height_max; int width_avg; int width_com; int width_min; int width_max; *nikud = FALSE; /* get stats */ ho_objlist_statistics (m->obj_list, min_height, max_height, min_width, max_width, &counter, &weight_avg, &weight_com, &weight_min, &weight_max, &height_avg, &height_com, &height_min, &height_max, &width_avg, &width_com, &width_min, &width_max); /* does it look like nikud ? */ if (height_avg < (2 * height_com / 3)) { *nikud = TRUE; } /* did we find the nikud ? */ if (height_com < (2 * height_avg / 3)) { *nikud = TRUE; /* re-get stats, now limit minial size */ ho_objlist_statistics (m->obj_list, 3 * height_avg / 2, 300, 3 * width_avg / 2, 300, &counter, &weight_avg, &weight_com, &weight_min, &weight_max, &height_avg, &height_com, &height_min, &height_max, &width_avg, &width_com, &width_min, &width_max); } /* is width logical ? */ if (height_com > 3 * width_com / 2) width_com = 2 * height_com / 3; *height = height_com; *width = width_com; return FALSE; } ho_bitmap * ho_objmap_to_bitmap (const ho_objmap * obj_in) { int x, y; ho_bitmap *pix = NULL; int index = 0; /* allocate memory */ pix = ho_bitmap_new (obj_in->width, obj_in->height); if (!pix) return NULL; /* copy pixels from gsl mtirxes */ for (x = 0; x < obj_in->width; x++) for (y = 0; y < obj_in->height; y++) { index = ho_objmap_get (obj_in, x, y); if (index) { /* set autput colors */ ho_bitmap_set (pix, x, y); } } return pix; } ho_bitmap * ho_objmap_to_bitmap_by_size (const ho_objmap * m, int min_height, int max_height, int min_width, int max_width) { int x, y; int index; int height; int width; ho_bitmap *m_out; /* allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; for (x = 0; x < m->width; x++) for (y = 0; y < m->height; y++) { index = ho_objmap_get (m, x, y); if (index) { /* on objmap objects are 1.. and on objlist 0.. */ index--; width = (((m->obj_list)->objects)[index]).width; height = (((m->obj_list)->objects)[index]).height; if (width < min_width || width > max_width || height < min_height || height > max_height) continue; ho_bitmap_set (m_out, x, y); } } return m_out; } ho_bitmap * ho_objmap_to_bitmap_by_index (const ho_objmap * m, const int index) { int x, y; ho_bitmap *m_out; int current_index; int height; int width; /* is this object realy an object ? */ if (index >= (m->obj_list)->size) return NULL; width = (((m->obj_list)->objects)[index]).width; height = (((m->obj_list)->objects)[index]).height; /* is this object realy a big object ? */ if (width < 2 || height < 2) return NULL; /* allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; for (x = 0; x < m->width; x++) for (y = 0; y < m->height; y++) { current_index = ho_objmap_get (m, x, y); if ((current_index - 1) == index) { ho_bitmap_set (m_out, x, y); } } return m_out; } ho_bitmap * ho_objmap_to_bitmap_by_index_window (const ho_objmap * m, const int index, const int frame) { int x, y; int x1, y1; ho_bitmap *m_out; int current_index; int height; int width; /* is this object realy an object ? */ if (index >= (m->obj_list)->size) return NULL; width = (((m->obj_list)->objects)[index]).width; height = (((m->obj_list)->objects)[index]).height; /* is this object realy a big object ? */ if (width < 2 || height < 2) return NULL; /* allocate memory */ m_out = ho_bitmap_new (width + 2 * frame, height + 2 * frame); if (!m_out) return NULL; x1 = (((m->obj_list)->objects)[index]).x; y1 = (((m->obj_list)->objects)[index]).y; m_out->x = m->x + x1 - frame; m_out->y = m->y + y1 - frame; for (x = 0; x < width; x++) for (y = 0; y < height; y++) { current_index = ho_objmap_get (m, x + x1, y + y1); if ((current_index - 1) == index) { ho_bitmap_set (m_out, x + frame, y + frame); } } return m_out; } int ho_objmap_update_reading_index_line (ho_objmap * m, const unsigned char n_columns, const unsigned char dir_ltr) { int index; int reading_index; int x; /* if n_columns != 253 then this is not one line sorting */ if (n_columns != 253) return TRUE; reading_index = 0; if (dir_ltr) { for (x = 0; x < m->width; x++) { for (index = 0; index < ho_objmap_get_size (m); index++) { if ((ho_objmap_get_object (m, index).x + ho_objmap_get_object (m, index).width - 1) == x) { ho_objmap_get_object (m, index).reading_index = reading_index; reading_index++; } } } } else { for (x = m->width; x >= 0; x--) { for (index = 0; index < ho_objmap_get_size (m); index++) { if ((ho_objmap_get_object (m, index).x + ho_objmap_get_object (m, index).width - 1) == x) { ho_objmap_get_object (m, index).reading_index = reading_index; reading_index++; } } } } return FALSE; } int ho_objmap_update_reading_index_column (ho_objmap * m, const unsigned char n_columns, const unsigned char dir_ltr) { int index; int reading_index; int y; /* if n_columns != 1 then this is not one column sorting */ if (n_columns != 1) return TRUE; reading_index = 0; for (y = 0; y < m->height; y++) { for (index = 0; index < ho_objmap_get_size (m); index++) { if ((ho_objmap_get_object (m, index).y) == y) { ho_objmap_get_object (m, index).reading_index = reading_index; reading_index++; } } } return FALSE; } int ho_objmap_update_reading_index_multi_columns (ho_objmap * m, const unsigned char n_columns, const unsigned char dir_ltr) { int index; int column; int reading_index; int y; int x_start, x_end; int column_start_list_size; int *column_start_list; ho_bitmap *m_bitmap = NULL; /* FIXME: if n_columns > 6 ? */ if (n_columns < 2 || n_columns > 6) return TRUE; reading_index = 0; /* get columns start list */ m_bitmap = ho_objmap_to_bitmap (m); if (!m_bitmap) return TRUE; column_start_list_size = ho_dimentions_get_columns_with_x_start (m_bitmap, &column_start_list); /* free bitmap */ ho_bitmap_free (m_bitmap); /* look at all the columns */ x_start = m->width; for (column = 0; column < column_start_list_size; column++) { /* get column start and end x's */ x_end = x_start; x_start = column_start_list[column]; /* look on all the blocks in this clomun */ for (y = 0; y < m->height; y++) { /* check all objects */ for (index = 0; index < ho_objmap_get_size (m); index++) { if ((ho_objmap_get_object (m, index).y) == y && (ho_objmap_get_object (m, index).x) >= x_start && (ho_objmap_get_object (m, index).x) < x_end) { ho_objmap_get_object (m, index).reading_index = reading_index; reading_index++; } } } } /* free clomun start list */ free (column_start_list); return FALSE; } int ho_objmap_update_reading_index (ho_objmap * m, const unsigned char n_columns, const unsigned char dir_ltr) { /* if n_columns == 1 then this is a one column sorting */ if (n_columns == 1) { return ho_objmap_update_reading_index_column (m, n_columns, dir_ltr); } /* if n_columns == 253 then this is a one line sorting */ if (n_columns == 253) { return ho_objmap_update_reading_index_line (m, n_columns, dir_ltr); } /* must be a multi column page */ return ho_objmap_update_reading_index_multi_columns (m, n_columns, dir_ltr); return FALSE; } ho_obj * ho_objmap_get_object_by_index (ho_objmap * m, int index) { return &((m->obj_list->objects)[index]); } libhocr-0.10.17/src/hocr.c0000644000175000017500000003043411044117745012121 00000000000000 /*************************************************************************** * hocr.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include "hocr.h" #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif /** convert a gray pixbuf to bitmap @param pix_in the input ho_pixbuf @param scale the scale to use @param no_auto_scale do not try to autoscale @param rotate the rotation angle to use @param no_auto_rotate do not try to autorotate @param adaptive what type of thresholding to use @param threshold the threshold to use 0..100 @param a_threshold the threshold to use for adaptive thresholding 0..100 @param progress a progress indicator 0..100 @return newly allocated gray ho_bitmap */ ho_bitmap * hocr_image_processing (const ho_pixbuf * pix_in, const unsigned char scale, const unsigned char no_auto_scale, double rotate, const unsigned char no_auto_rotate, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, int *progress) { ho_bitmap *bitmap_out = NULL; ho_bitmap *bitmap_temp = NULL; double angle = 0.0; int scale_by = 0; unsigned char size = 0; /* init progress */ *progress = 0; /* get the raw b/w bitmap from the pixbuf */ bitmap_temp = ho_pixbuf_to_bitmap_wrapper (pix_in, scale, adaptive, threshold, a_threshold, size); if (!bitmap_temp) return NULL; /* update progress */ *progress = 25; /* do we want to auto scale ? */ if (!scale && !no_auto_scale) { /* get fonts size for autoscale */ if (ho_dimentions_font_width_height_nikud (bitmap_temp, 6, 200, 6, 200)) return NULL; /* if fonts are too small, re-scale image */ if (bitmap_temp->font_height < 15) scale_by = 3; else if (bitmap_temp->font_height < 30) scale_by = 2; else scale_by = 1; if (scale_by > 1) { /* re-create bitmap */ ho_bitmap_free (bitmap_temp); bitmap_temp = ho_pixbuf_to_bitmap_wrapper (pix_in, scale_by, adaptive, threshold, a_threshold, size); if (!bitmap_temp) return NULL; } } /* update progress */ *progress = 50; /* remove very small and very large things */ bitmap_out = ho_bitmap_filter_by_size (bitmap_temp, 3, 3 * bitmap_temp->height / 4, 3, 3 * bitmap_temp->width / 4); ho_bitmap_free (bitmap_temp); if (!bitmap_out) return NULL; /* update progress */ *progress = 75; /* rotate image */ if (rotate) { bitmap_temp = ho_bitmap_rotate (bitmap_out, rotate); ho_bitmap_free (bitmap_out); if (!bitmap_temp) return NULL; bitmap_out = bitmap_temp; } else if (!no_auto_rotate) { /* get fonts size for auto angle */ if (ho_dimentions_font_width_height_nikud (bitmap_out, 6, 200, 6, 200)) return NULL; angle = ho_dimentions_get_lines_angle (bitmap_out); if (angle) { bitmap_temp = ho_bitmap_rotate (bitmap_out, angle); ho_bitmap_free (bitmap_out); if (!bitmap_temp) return NULL; bitmap_out = bitmap_temp; } } return bitmap_out; } /** new ho_layout @param m_in a pointer to a text bitmap @param font_spacing_code -3 tight .. 0 .. 3 spaced @param paragraph_setup free text blocks or boxed in columns @param slicing_threshold percent of line fill to cut fonts @param slicing_width what is a wide font @param dir true-ltr false-rtl @param progress a progress indicator 0..100 @return a newly allocated and filled layout */ ho_layout * hocr_layout_analysis (const ho_bitmap * m_in, const int font_spacing_code, const int paragraph_setup, const int slicing_threshold, const int slicing_width, const int line_leeway, const unsigned char dir_ltr, int *progress) { int cols = paragraph_setup; int block_index; int line_index; int word_index; ho_layout *layout_out = NULL; /* init progress */ *progress = 0; /* check paragraph_setup */ if (!cols) cols = ho_dimentions_get_columns (m_in); /* create a new layout */ layout_out = ho_layout_new (m_in, font_spacing_code, cols, dir_ltr); if (!layout_out) return NULL; *progress = 10; ho_layout_create_block_mask (layout_out); /* look for lines inside blocks */ for (block_index = 0; block_index < layout_out->n_blocks; block_index++) { ho_layout_create_line_mask (layout_out, block_index); /* look for words inside line */ for (line_index = 0; line_index < layout_out->n_lines[block_index]; line_index++) { ho_layout_create_word_mask (layout_out, block_index, line_index); /* look for fonts inside word */ for (word_index = 0; word_index < layout_out->n_words[block_index][line_index]; word_index++) { ho_layout_create_font_mask (layout_out, block_index, line_index, word_index, slicing_threshold, slicing_width, line_leeway); } /* update progress */ *progress = 100 * ((double) block_index / (double) layout_out->n_blocks + (double) line_index / (double) (layout_out->n_lines[block_index] * layout_out->n_blocks)); } } return layout_out; } /** fill a text buffer with fonts recognized from a page layout @param l_page the page layout to recognize @param s_text_out the text buffer to fill @param html output format is html @param font_code code for the font to use @param nikud recognize nikud @param progress a progress indicator 0..100 @return FALSE */ int hocr_font_recognition (const ho_layout * l_page, ho_string * s_text_out, const unsigned char html, int font_code, const unsigned char nikud, unsigned char do_linguistics, int *progress) { int block_index; int line_index; int word_index; int font_index; int current_font_number = 0; int number_of_fonts = l_page->number_of_fonts; ho_bitmap *m_text = NULL; ho_bitmap *m_mask = NULL; ho_bitmap *m_font_main_sign = NULL; ho_bitmap *m_font_nikud = NULL; char text_out[200]; const char *font; const char *font_nikud; const char *font_dagesh; const char *font_shin; /* init progress */ *progress = 0; /* did we get a text buffer and a layout ? */ if (!s_text_out || !l_page) return TRUE; /* loop over the layout */ for (block_index = 0; block_index < l_page->n_blocks; block_index++) { /* start of paragraph */ if (html) { /* FIXME: text overflow ?! */ sprintf (text_out, "
\n", block_index + 1, l_page->m_blocks_text[block_index]->x, l_page->m_blocks_text[block_index]->y, l_page->m_blocks_text[block_index]->x + l_page->m_blocks_text[block_index]->width, l_page->m_blocks_text[block_index]->y + l_page->m_blocks_text[block_index]->height); ho_string_cat (s_text_out, text_out); } for (line_index = 0; line_index < l_page->n_lines[block_index]; line_index++) { /* start of line */ /* loop on all the words in this line */ for (word_index = 0; word_index < l_page->n_words[block_index][line_index]; word_index++) { int word_length = l_page->n_fonts[block_index][line_index][word_index]; unsigned char word_end = FALSE; unsigned char word_start = TRUE; int last_char_i = 0; int char_i = 0; /* start of word */ for (font_index = 0; font_index < word_length; font_index++) { word_end = (font_index == (word_length - 1)); word_start = (font_index == 0); /* get font images */ /* get the font */ m_text = ho_layout_get_font_text (l_page, block_index, line_index, word_index, font_index); if (!m_text) return TRUE; /* get font line mask */ m_mask = ho_layout_get_font_line_mask (l_page, block_index, line_index, word_index, font_index); if (!m_mask) return TRUE; /* get font main sign */ m_font_main_sign = ho_font_main_sign (m_text, m_mask); if (!m_font_main_sign) return TRUE; /* recognize font from images */ last_char_i = char_i; font = ho_recognize_font (m_font_main_sign, m_mask, font_code, do_linguistics, word_end, word_start, &char_i, last_char_i); /* insert font to text out */ ho_string_cat (s_text_out, font); /* get font nikud */ if (nikud) { m_font_nikud = ho_bitmap_clone (m_text); if (!m_font_nikud) return TRUE; ho_bitmap_andnot (m_font_nikud, m_font_main_sign); /* recognize font from images */ font_nikud = ho_recognize_nikud (m_font_nikud, m_mask, font_code, &font_dagesh, &font_shin); /* free bitmaps */ ho_bitmap_free (m_font_nikud); m_font_nikud = NULL; /* insert font nikud to text out */ ho_string_cat (s_text_out, font_shin); ho_string_cat (s_text_out, font_dagesh); ho_string_cat (s_text_out, font_nikud); } /* free bitmaps */ ho_bitmap_free (m_font_main_sign); ho_bitmap_free (m_text); ho_bitmap_free (m_mask); /* this are empty pointers */ m_text = m_mask = m_font_main_sign = NULL; /* update progress */ current_font_number++; *progress = 100 * current_font_number / number_of_fonts; } /* end of word */ ho_string_cat (s_text_out, " "); } /* end of line */ if (html) ho_string_cat (s_text_out, "
\n"); else ho_string_cat (s_text_out, "\n"); } /* end of block */ if (html) ho_string_cat (s_text_out, "
\n
\n"); else ho_string_cat (s_text_out, "\n"); } return FALSE; } int hocr_do_ocr_fine (const ho_pixbuf * pix_in, ho_string * s_text_out, const unsigned char scale, const unsigned char no_auto_scale, double rotate, const unsigned char no_auto_rotate, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, const int font_spacing_code, const int paragraph_setup, const int slicing_threshold, const int slicing_width, const int line_leeway, const unsigned char dir_ltr, const unsigned char html, int font_code, const unsigned char nikud, const unsigned char do_linguistics, int *progress) { ho_bitmap *m_in = NULL; ho_layout *l_page = NULL; int return_val; if (!pix_in) return TRUE; m_in = hocr_image_processing (pix_in, scale, no_auto_scale, rotate, no_auto_rotate, adaptive, threshold, a_threshold, progress); if (!m_in) return TRUE; l_page = hocr_layout_analysis (m_in, font_spacing_code, paragraph_setup, slicing_threshold, slicing_width, line_leeway, dir_ltr, progress); if (!l_page) { ho_bitmap_free (m_in); return TRUE; } return_val = hocr_font_recognition (l_page, s_text_out, html, font_code, nikud, do_linguistics, progress); return return_val; } int hocr_do_ocr (const ho_pixbuf * pix_in, ho_string * s_text_out, const unsigned char html, int font_code, const unsigned char do_linguistics, int *progress) { return hocr_do_ocr_fine (pix_in, s_text_out, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, html, font_code, 1, do_linguistics, progress); } const char * hocr_get_build_string () { return BUILD; } const char * hocr_get_version_string () { return VERSION; } libhocr-0.10.17/src/ho_array_hist.c0000644000175000017500000000754511021232071014011 00000000000000 /*************************************************************************** * ho_array_hist.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_array_hist.h" #define square(x) ((x)*(x)) /** new ho_array_hist @param size the number of buckets in the histogram @return newly allocated ho_array */ ho_array_hist * ho_array_hist_new (const int size) { int x; ho_array_hist *hist = NULL; /* * allocate memory for histogram */ hist = (ho_array_hist *) malloc (sizeof (ho_array)); if (!hist) { return NULL; } /* * set header */ hist->size = size; /* * allocate memory for data */ hist->data = malloc (hist->size * sizeof (double)); if (!(hist->data)) { free (hist); return NULL; } /* init value to 0 */ for (x = 0; x < hist->size; x++) { (hist->data)[x] = 0.0; } return hist; } /** free an ho_array_hist @param hist pointer to an ho_array_hist @return FALSE */ int ho_array_hist_free (ho_array_hist * hist) { if (!hist) return TRUE; if (hist->data) free (hist->data); free (hist); return FALSE; } /** calculate ho_array_hist from ho_array @param hist the histogram to init @param ar the ho_array to use @return FALSE */ unsigned char ho_array_hist_init (ho_array_hist * hist, const ho_array * ar) { int i, x, y; double min, max, range; /* get min max values */ ho_array_minmax (ar, &min, &max); range = max - min; /* calc accum hist */ for (x = 0; x < ar->width; x++) for (y = 0; y < ar->height; y++) { i = (int) ((hist->size - 1) * ((ar->data)[x + y * ar->width] - min) / range); ((hist->data)[i])++; } /* normelize hist */ for (i = 0; i < hist->size; i++) ((hist->data)[i]) /= (double) (ar->width * ar->height); return FALSE; } /** new ho_array_hist @param size the number of buckets in the histogram @param ar the ho_array to use @return newly allocated ho_array */ ho_array_hist * ho_array_hist_new_from_array (const int size, const ho_array * ar) { ho_array_hist *hist = NULL; hist = ho_array_hist_new (size); if (!hist) return NULL; ho_array_hist_init (hist, ar); return hist; } /** get data from a ho_array_hist @param hist pointer to a ho_array_hist @param i the bucket index @return the value of the histogram */ double ho_array_hist_get_at (const ho_array_hist * hist, int i) { return hist->data[i]; } /** new ho_array from ho_array_hist @param hist pointer to an ho_array_hist @return newly allocated ho_array */ ho_array * ho_array_hist_to_array (const ho_array_hist * hist) { int x, y; ho_array *m_out = NULL; /* allocate memory */ m_out = ho_array_new (hist->size, hist->size); if (!m_out) return NULL; /* copy data */ for (x = 0; x < hist->size; x++) { y = (int) ((double) hist->size * hist->data[x]); ho_array_set (m_out, x, y, 1.0); } return m_out; } libhocr-0.10.17/src/fonts/0000777000175000017500000000000011051630065012224 500000000000000libhocr-0.10.17/src/fonts/ho_recognize_font_3.c0000644000175000017500000001615411051626121016234 00000000000000 /*************************************************************************** * ho_recognize_font_3.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" #include "ho_recognize.h" #include "ho_recognize_font_3.h" /* font recognition functions */ /* functions get an array of doubles 0..1 and return a double 0..1 * 0 if this does not look like the font until 1 looks exactly like the font */ double ho_recognize_font_3_zero (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_one (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_two (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_three (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_four (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_five (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_six (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_seven (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_eight (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_nine (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_minus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_plus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_div (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_open (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_close (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_tag (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_two_tags (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_question (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_exclem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_dot_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_dot_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_alef (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_bet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_gimal (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_dalet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_hey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_vav (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_zayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_het (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_tet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_yud (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_caf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_caf_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_lamed (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_mem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_mem_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_nun (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_nun_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_samech (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_ayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_pey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_pey_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_tzadi (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_tzadi_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_kuf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_resh (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_shin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_3_tav (const double *array_in) { double return_value = 0.0; return return_value; } libhocr-0.10.17/src/fonts/ho_recognize_font_5.c0000644000175000017500000001615411051626107016242 00000000000000 /*************************************************************************** * ho_recognize_font_5.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" #include "ho_recognize.h" #include "ho_recognize_font_5.h" /* font recognition functions */ /* functions get an array of doubles 0..1 and return a double 0..1 * 0 if this does not look like the font until 1 looks exactly like the font */ double ho_recognize_font_5_zero (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_one (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_two (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_three (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_four (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_five (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_six (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_seven (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_eight (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_nine (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_minus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_plus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_div (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_open (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_close (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_tag (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_two_tags (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_question (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_exclem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_dot_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_dot_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_alef (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_bet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_gimal (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_dalet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_hey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_vav (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_zayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_het (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_tet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_yud (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_caf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_caf_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_lamed (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_mem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_mem_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_nun (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_nun_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_samech (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_ayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_pey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_pey_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_tzadi (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_tzadi_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_kuf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_resh (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_shin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_5_tav (const double *array_in) { double return_value = 0.0; return return_value; } libhocr-0.10.17/src/fonts/ho_recognize_font_5.h0000644000175000017500000001013311017002613016226 00000000000000 /*************************************************************************** * ho_recognize_font_5.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_recognize_font_5.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_RECOGNIZE_FONT_5_H #define HO_RECOGNIZE_FONT_5_H 1 double ho_recognize_font_5_zero (const double *array_in); double ho_recognize_font_5_one (const double *array_in); double ho_recognize_font_5_two (const double *array_in); double ho_recognize_font_5_three (const double *array_in); double ho_recognize_font_5_four (const double *array_in); double ho_recognize_font_5_five (const double *array_in); double ho_recognize_font_5_six (const double *array_in); double ho_recognize_font_5_seven (const double *array_in); double ho_recognize_font_5_eight (const double *array_in); double ho_recognize_font_5_nine (const double *array_in); double ho_recognize_font_5_dot (const double *array_in); double ho_recognize_font_5_comma (const double *array_in); double ho_recognize_font_5_open (const double *array_in); double ho_recognize_font_5_close (const double *array_in); double ho_recognize_font_5_minus (const double *array_in); double ho_recognize_font_5_plus (const double *array_in); double ho_recognize_font_5_div (const double *array_in); double ho_recognize_font_5_tag (const double *array_in); double ho_recognize_font_5_two_tags (const double *array_in); double ho_recognize_font_5_question (const double *array_in); double ho_recognize_font_5_exclem (const double *array_in); double ho_recognize_font_5_dot_dot (const double *array_in); double ho_recognize_font_5_dot_comma (const double *array_in); double ho_recognize_font_5_alef (const double *array_in); double ho_recognize_font_5_bet (const double *array_in); double ho_recognize_font_5_gimal (const double *array_in); double ho_recognize_font_5_dalet (const double *array_in); double ho_recognize_font_5_hey (const double *array_in); double ho_recognize_font_5_vav (const double *array_in); double ho_recognize_font_5_zayin (const double *array_in); double ho_recognize_font_5_het (const double *array_in); double ho_recognize_font_5_tet (const double *array_in); double ho_recognize_font_5_yud (const double *array_in); double ho_recognize_font_5_caf (const double *array_in); double ho_recognize_font_5_caf_sofit (const double *array_in); double ho_recognize_font_5_lamed (const double *array_in); double ho_recognize_font_5_mem (const double *array_in); double ho_recognize_font_5_mem_sofit (const double *array_in); double ho_recognize_font_5_nun (const double *array_in); double ho_recognize_font_5_nun_sofit (const double *array_in); double ho_recognize_font_5_samech (const double *array_in); double ho_recognize_font_5_ayin (const double *array_in); double ho_recognize_font_5_pey (const double *array_in); double ho_recognize_font_5_pey_sofit (const double *array_in); double ho_recognize_font_5_tzadi (const double *array_in); double ho_recognize_font_5_tzadi_sofit (const double *array_in); double ho_recognize_font_5_kuf (const double *array_in); double ho_recognize_font_5_resh (const double *array_in); double ho_recognize_font_5_shin (const double *array_in); double ho_recognize_font_5_tav (const double *array_in); #endif /* HO_RECOGNIZE_FONT_5_H */ libhocr-0.10.17/src/fonts/ho_recognize_font_1.h0000644000175000017500000001013311017002613016222 00000000000000 /*************************************************************************** * ho_recognize_font_1.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_recognize_font_1.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_RECOGNIZE_FONT_1_H #define HO_RECOGNIZE_FONT_1_H 1 double ho_recognize_font_1_zero (const double *array_in); double ho_recognize_font_1_one (const double *array_in); double ho_recognize_font_1_two (const double *array_in); double ho_recognize_font_1_three (const double *array_in); double ho_recognize_font_1_four (const double *array_in); double ho_recognize_font_1_five (const double *array_in); double ho_recognize_font_1_six (const double *array_in); double ho_recognize_font_1_seven (const double *array_in); double ho_recognize_font_1_eight (const double *array_in); double ho_recognize_font_1_nine (const double *array_in); double ho_recognize_font_1_dot (const double *array_in); double ho_recognize_font_1_comma (const double *array_in); double ho_recognize_font_1_open (const double *array_in); double ho_recognize_font_1_close (const double *array_in); double ho_recognize_font_1_minus (const double *array_in); double ho_recognize_font_1_plus (const double *array_in); double ho_recognize_font_1_div (const double *array_in); double ho_recognize_font_1_tag (const double *array_in); double ho_recognize_font_1_two_tags (const double *array_in); double ho_recognize_font_1_question (const double *array_in); double ho_recognize_font_1_exclem (const double *array_in); double ho_recognize_font_1_dot_dot (const double *array_in); double ho_recognize_font_1_dot_comma (const double *array_in); double ho_recognize_font_1_alef (const double *array_in); double ho_recognize_font_1_bet (const double *array_in); double ho_recognize_font_1_gimal (const double *array_in); double ho_recognize_font_1_dalet (const double *array_in); double ho_recognize_font_1_hey (const double *array_in); double ho_recognize_font_1_vav (const double *array_in); double ho_recognize_font_1_zayin (const double *array_in); double ho_recognize_font_1_het (const double *array_in); double ho_recognize_font_1_tet (const double *array_in); double ho_recognize_font_1_yud (const double *array_in); double ho_recognize_font_1_caf (const double *array_in); double ho_recognize_font_1_caf_sofit (const double *array_in); double ho_recognize_font_1_lamed (const double *array_in); double ho_recognize_font_1_mem (const double *array_in); double ho_recognize_font_1_mem_sofit (const double *array_in); double ho_recognize_font_1_nun (const double *array_in); double ho_recognize_font_1_nun_sofit (const double *array_in); double ho_recognize_font_1_samech (const double *array_in); double ho_recognize_font_1_ayin (const double *array_in); double ho_recognize_font_1_pey (const double *array_in); double ho_recognize_font_1_pey_sofit (const double *array_in); double ho_recognize_font_1_tzadi (const double *array_in); double ho_recognize_font_1_tzadi_sofit (const double *array_in); double ho_recognize_font_1_kuf (const double *array_in); double ho_recognize_font_1_resh (const double *array_in); double ho_recognize_font_1_shin (const double *array_in); double ho_recognize_font_1_tav (const double *array_in); #endif /* HO_RECOGNIZE_FONT_1_H */ libhocr-0.10.17/src/fonts/ho_recognize_font_4.c0000644000175000017500000001615411051625754016250 00000000000000 /*************************************************************************** * ho_recognize_font_4.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" #include "ho_recognize.h" #include "ho_recognize_font_4.h" /* font recognition functions */ /* functions get an array of doubles 0..1 and return a double 0..1 * 0 if this does not look like the font until 1 looks exactly like the font */ double ho_recognize_font_4_zero (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_one (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_two (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_three (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_four (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_five (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_six (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_seven (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_eight (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_nine (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_minus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_plus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_div (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_open (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_close (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_tag (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_two_tags (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_question (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_exclem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_dot_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_dot_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_alef (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_bet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_gimal (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_dalet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_hey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_vav (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_zayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_het (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_tet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_yud (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_caf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_caf_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_lamed (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_mem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_mem_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_nun (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_nun_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_samech (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_ayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_pey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_pey_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_tzadi (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_tzadi_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_kuf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_resh (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_shin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_4_tav (const double *array_in) { double return_value = 0.0; return return_value; } libhocr-0.10.17/src/fonts/ho_recognize_font_6.c0000644000175000017500000001615411051626061016242 00000000000000 /*************************************************************************** * ho_recognize_font_6.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" #include "ho_recognize.h" #include "ho_recognize_font_6.h" /* font recognition functions */ /* functions get an array of doubles 0..1 and return a double 0..1 * 0 if this does not look like the font until 1 looks exactly like the font */ double ho_recognize_font_6_zero (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_one (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_two (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_three (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_four (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_five (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_six (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_seven (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_eight (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_nine (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_minus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_plus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_div (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_open (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_close (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_tag (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_two_tags (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_question (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_exclem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_dot_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_dot_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_alef (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_bet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_gimal (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_dalet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_hey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_vav (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_zayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_het (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_tet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_yud (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_caf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_caf_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_lamed (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_mem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_mem_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_nun (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_nun_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_samech (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_ayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_pey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_pey_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_tzadi (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_tzadi_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_kuf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_resh (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_shin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_6_tav (const double *array_in) { double return_value = 0.0; return return_value; } libhocr-0.10.17/src/fonts/ho_recognize_font_4.h0000644000175000017500000001013311017002613016225 00000000000000 /*************************************************************************** * ho_recognize_font_4.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_recognize_font_4.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_RECOGNIZE_FONT_4_H #define HO_RECOGNIZE_FONT_4_H 1 double ho_recognize_font_4_zero (const double *array_in); double ho_recognize_font_4_one (const double *array_in); double ho_recognize_font_4_two (const double *array_in); double ho_recognize_font_4_three (const double *array_in); double ho_recognize_font_4_four (const double *array_in); double ho_recognize_font_4_five (const double *array_in); double ho_recognize_font_4_six (const double *array_in); double ho_recognize_font_4_seven (const double *array_in); double ho_recognize_font_4_eight (const double *array_in); double ho_recognize_font_4_nine (const double *array_in); double ho_recognize_font_4_dot (const double *array_in); double ho_recognize_font_4_comma (const double *array_in); double ho_recognize_font_4_open (const double *array_in); double ho_recognize_font_4_close (const double *array_in); double ho_recognize_font_4_minus (const double *array_in); double ho_recognize_font_4_plus (const double *array_in); double ho_recognize_font_4_div (const double *array_in); double ho_recognize_font_4_tag (const double *array_in); double ho_recognize_font_4_two_tags (const double *array_in); double ho_recognize_font_4_question (const double *array_in); double ho_recognize_font_4_exclem (const double *array_in); double ho_recognize_font_4_dot_dot (const double *array_in); double ho_recognize_font_4_dot_comma (const double *array_in); double ho_recognize_font_4_alef (const double *array_in); double ho_recognize_font_4_bet (const double *array_in); double ho_recognize_font_4_gimal (const double *array_in); double ho_recognize_font_4_dalet (const double *array_in); double ho_recognize_font_4_hey (const double *array_in); double ho_recognize_font_4_vav (const double *array_in); double ho_recognize_font_4_zayin (const double *array_in); double ho_recognize_font_4_het (const double *array_in); double ho_recognize_font_4_tet (const double *array_in); double ho_recognize_font_4_yud (const double *array_in); double ho_recognize_font_4_caf (const double *array_in); double ho_recognize_font_4_caf_sofit (const double *array_in); double ho_recognize_font_4_lamed (const double *array_in); double ho_recognize_font_4_mem (const double *array_in); double ho_recognize_font_4_mem_sofit (const double *array_in); double ho_recognize_font_4_nun (const double *array_in); double ho_recognize_font_4_nun_sofit (const double *array_in); double ho_recognize_font_4_samech (const double *array_in); double ho_recognize_font_4_ayin (const double *array_in); double ho_recognize_font_4_pey (const double *array_in); double ho_recognize_font_4_pey_sofit (const double *array_in); double ho_recognize_font_4_tzadi (const double *array_in); double ho_recognize_font_4_tzadi_sofit (const double *array_in); double ho_recognize_font_4_kuf (const double *array_in); double ho_recognize_font_4_resh (const double *array_in); double ho_recognize_font_4_shin (const double *array_in); double ho_recognize_font_4_tav (const double *array_in); #endif /* HO_RECOGNIZE_FONT_4_H */ libhocr-0.10.17/src/fonts/ho_recognize_font_1.c0000644000175000017500000012001111042703464016224 00000000000000 /*************************************************************************** * ho_recognize_font_1.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" #include "ho_recognize.h" #include "ho_recognize_font_1.h" /* font recognition functions */ /* functions get an array of doubles 0..1 and return a double 0..1 * 0 if this does not look like the font until 1 looks exactly like the font */ double ho_recognize_font_1_zero (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_one (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_two (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_three (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_four (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_five (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_six (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_seven (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_eight (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_nine (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_dot (const double *array_in) { double return_value = 0.0; if (TOP < 0.3) return_value += 0.1; if (BOTTOM < 0.53 && BOTTOM > 0.47) return_value += 0.2; if (WIDTH < 0.3) return_value += 0.1; if (HEIGHT < 0.3) return_value += 0.2; if (BOTTOM_LEFT_EDGE) return_value -= 0.3; if (WIDTH > 0.3) return_value -= 0.3; if (HEIGHT > 0.36) return_value -= 0.3; if (TOP > 0.3) return_value -= 0.3; return return_value; } double ho_recognize_font_1_comma (const double *array_in) { double return_value = 0.0; if (TOP < 0.3) return_value += 0.1; if (BOTTOM < 0.53 && BOTTOM > 0.47) return_value += 0.2; if (WIDTH < 0.3) return_value += 0.1; if (HEIGHT < 0.36) return_value += 0.2; if (BOTTOM_LEFT_EDGE) return_value += 0.2; if (WIDTH > 0.3) return_value -= 0.3; if (HEIGHT > 0.36) return_value -= 0.3; if (TOP > 0.3) return_value -= 0.3; if (BOTTOM > 0.55) return_value -= 0.2; return return_value; } double ho_recognize_font_1_minus (const double *array_in) { double return_value = 0.0; if (HEIGHT < 0.15) return_value += 0.2; if (TOP < 0.3) return_value += 0.2; if (BOTTOM > 0.7) return_value += 0.2; if (WIDTH_BY_HEIGHT == 1.0 && HEIGHT < 0.1) return_value += 0.2; if (HEIGHT > 0.2) return_value -= 0.3; if (WIDTH < 0.15) return_value -= 0.3; if (WIDTH_BY_HEIGHT < 0.1) return_value -= 0.3; return return_value; } double ho_recognize_font_1_plus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_div (const double *array_in) { double return_value = 0.0; if (DIAGONAL_LEFT_BAR) return_value += 0.1; if (TOP_RIGHT < 0.32) return_value += 0.1; if (TOP_LEFT > 0.8) return_value += 0.1; if (BOTTOM_RIGHT > 0.9) return_value += 0.1; if (BOTTOM_LEFT < 0.11) return_value += 0.1; if (DIAGONAL_BAR) return_value -= 0.2; if (TOP_RIGHT > 0.4) return_value -= 0.2; if (TOP_LEFT < 0.7) return_value -= 0.2; if (BOTTOM_RIGHT < 0.8) return_value -= 0.2; if (BOTTOM_LEFT > 0.21) return_value -= 0.2; return return_value; } double ho_recognize_font_1_open (const double *array_in) { double return_value = 0.0; if (TOP_RIGHT < 0.25) return_value += 0.1; if (TOP_LEFT > 0.75) return_value += 0.1; if (BOTTOM_RIGHT < 0.25) return_value += 0.1; if (BOTTOM_LEFT > 0.75) return_value += 0.1; if (MID_RIGHT > 0.75) return_value += 0.1; if (MID_LEFT < 0.25) return_value += 0.1; if (WIDTH > 0.3) return_value -= 0.2; if (WIDTH_BY_HEIGHT > 0.35) return_value -= 0.2; if (RIGHT_VBAR) return_value -= 0.2; if (TWO_VLINES_UP) return_value -= 0.2; if (TWO_VLINES_DOWN) return_value -= 0.2; if (LEFT_TOP_EDGE) return_value -= 0.2; if (LEFT_BOTTOM_EDGE) return_value -= 0.2; if (DOT_PART) return_value -= 0.2; if (COMMA_PART) return_value -= 0.2; if (MID_LEFT > 0.25) return_value -= 0.2; return return_value; } double ho_recognize_font_1_close (const double *array_in) { double return_value = 0.0; if (TOP_RIGHT > 0.75) return_value += 0.1; if (TOP_LEFT < 0.25) return_value += 0.1; if (BOTTOM_RIGHT > 0.75) return_value += 0.1; if (BOTTOM_LEFT < 0.25) return_value += 0.1; if (MID_RIGHT < 0.25) return_value += 0.1; if (MID_LEFT > 0.75) return_value += 0.1; if (WIDTH > 0.3) return_value -= 0.2; if (WIDTH_BY_HEIGHT > 0.35) return_value -= 0.2; if (LEFT_VBAR) return_value -= 0.2; if (TWO_VLINES_UP) return_value -= 0.2; if (TWO_VLINES_DOWN) return_value -= 0.2; if (RIGHT_TOP_EDGE) return_value -= 0.2; if (RIGHT_BOTTOM_EDGE) return_value -= 0.2; if (DOT_PART) return_value -= 0.2; if (COMMA_PART) return_value -= 0.2; if (MID_RIGHT > 0.25) return_value -= 0.2; return return_value; } double ho_recognize_font_1_tag (const double *array_in) { double return_value = 0.0; if (TOP < 0.53 && TOP > 0.47) return_value += 0.1; if (BOTTOM > 0.60) return_value += 0.15; if (WIDTH < 0.3) return_value += 0.1; if (HEIGHT < 0.37) return_value += 0.15; if (TOP_LEFT > 0.8) return_value += 0.2; if (RIGHT_TOP_EDGE) return_value += 0.1; if (TOP_LEFT_EDGE) return_value -= 0.2; if (BOTTOM < 0.60) return_value -= 0.2; if (TOP < 0.3) return_value -= 0.2; if (WIDTH > 0.23) return_value -= 0.3; if (WIDTH_BY_HEIGHT > 0.95) return_value -= 0.2; return return_value; } double ho_recognize_font_1_two_tags (const double *array_in) { int count_edges_top; int count_edges_bottom; double return_value = 0.0; count_edges_top = RIGHT_TOP_EDGE * 10.0 + MID_TOP_EDGE * 10.0 + LEFT_TOP_EDGE * 10; count_edges_bottom = RIGHT_BOTTOM_EDGE * 10.0 + MID_BOTTOM_EDGE * 10.0 + LEFT_BOTTOM_EDGE * 10; if (TOP < 0.53 && TOP > 0.45) return_value += 0.1; if (BOTTOM > 0.60) return_value += 0.15; if (WIDTH < 0.8 && WIDTH > 0.15) return_value += 0.1; if (HEIGHT < 0.37) return_value += 0.15; if (TOP_LEFT > 0.8) return_value += 0.2; if (RIGHT_TOP_EDGE) return_value += 0.1; if (count_edges_top == 2) return_value += 0.1; if (count_edges_bottom == 2) return_value += 0.1; if (TOP_LEFT_EDGE) return_value -= 0.2; if (BOTTOM < 0.60) return_value -= 0.2; if (TOP < 0.3) return_value -= 0.2; if (WIDTH > 0.23) return_value -= 0.3; if (count_edges_top != 2) return_value -= 0.1; if (count_edges_bottom != 2) return_value -= 0.1; return return_value; } double ho_recognize_font_1_question (const double *array_in) { double return_value = 0.0; if (MID_LEFT_END || TOP_LEFT_END) return_value += 0.1; if (WIDTH < 0.3) return_value += 0.1; if (DOT_PART) return_value += 0.2; if (TOP_RIGTH_EDGE || MID_RIGTH_EDGE) return_value += 0.1; if (MID_RIGHT_END || TOP_MID_END) return_value -= 0.2; if (BOTTOM_HBAR) return_value -= 0.2; if (!DOT_PART) return_value -= 0.1; if (BOTTOM < 0.45 || BOTTOM > 0.60) return_value -= 0.2; if (TOP < 0.45 || TOP > 0.58) return_value -= 0.2; return return_value; } double ho_recognize_font_1_exclem (const double *array_in) { double return_value = 0.0; if (WIDTH_BY_HEIGHT < 0.4) return_value += 0.1; if (WIDTH < 0.2) return_value += 0.1; if (DOT_PART) return_value += 0.2; if (WIDTH_BY_HEIGHT > 0.4) return_value -= 0.1; if (WIDTH > 0.25) return_value -= 0.1; if (!DOT_PART) return_value -= 0.1; if (BOTTOM < 0.45 || BOTTOM > 0.6) return_value -= 0.2; if (TOP < 0.45 || TOP > 0.6) return_value -= 0.2; return return_value; } double ho_recognize_font_1_dot_dot (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (BOTTOM_HBAR) return_value += 0.1; if (MID_RIGHT > 0.9 && MID_LEFT > 0.9) return_value += 0.1; if (WIDTH_BY_HEIGHT < 0.6) return_value += 0.1; if (DOT_PART) return_value += 0.2; if (!TOP_HBAR) return_value -= 0.2; if (!BOTTOM_HBAR) return_value -= 0.2; if (!(MID_RIGHT > 0.9) || !(MID_LEFT > 0.9)) return_value -= 0.2; if (WIDTH_BY_HEIGHT > 0.6) return_value -= 0.1; if (WIDTH_BY_HEIGHT > 0.4) return_value -= 0.1; if (WIDTH > 0.25) return_value -= 0.1; return return_value; } double ho_recognize_font_1_dot_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_1_alef (const double *array_in) { double return_value = 0.0; if (DIAGONAL_BAR > 0.5) return_value += 0.2; if (LEFT_BOTTOM_EDGE) return_value += 0.1; if (LEFT_BOTTOM_NOTCH || MID_BOTTOM_NOTCH) return_value += 0.1; if (MID_BOTTOM_NOTCH) return_value += 0.1; if (MID_MID_CROSS) return_value += 0.1; if (TOP_LEFT_NOTCH || MID_LEFT_NOTCH) return_value += 0.1; if (MID_RIGHT_NOTCH) return_value += 0.1; if (BOTTOM_LEFT_END && BOTTOM_RIGHT_END) return_value += 0.1; if (DIAGONAL_BAR < 0.5) return_value -= 0.1; if (WIDTH < 0.45) return_value -= 0.1; if (WIDTH < 0.40 || HEIGHT < 0.40) return_value -= 0.2; if (HEIGHT > 0.55) return_value -= 0.2; if (RIGHT_VBAR) return_value -= 0.1; if (BOTTOM_HBAR) return_value -= 0.1; if (BOTTOM_MID == 1.0) return_value -= 0.2; if (MID_RIGTH_EDGE) return_value -= 0.1; return return_value; } double ho_recognize_font_1_bet (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (BOTTOM_HBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (MID_LEFT_NOTCH) return_value += 0.1; if (MID_LEFT > 0.9) return_value += 0.1; if (WIDTH_BY_HEIGHT > 0.8) return_value += 0.1; if (BIG_BOTTOM_RIGTH_EDGE) return_value += 0.2; if (BOTTOM_RIGTH_EDGE && BOTTOM_RIGHT < 0.25) return_value += 0.1; if (BOTTOM_LEFT_END && TOP_LEFT_END && !TOP_RIGHT_END) return_value += 0.1; if (!BOTTOM_RIGTH_EDGE) return_value -= 0.3; if (MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) return_value -= 0.3; if (BOTTOM_HBAR < 0.5) return_value -= 0.2; if (LEFT_VBAR) return_value -= 0.2; if (WIDTH < 0.3) return_value -= 0.3; if (TOP_LEFT > (BOTTOM_LEFT + 0.25)) return_value -= 0.3; if (MID_LEFT < 0.3) return_value -= 0.3; if ((MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) && WIDTH_BY_HEIGHT < 0.6) return_value -= 0.2; if (BOTTOM > 0.57 || BOTTOM < 43) return_value -= 0.20; if (WIDTH_BY_HEIGHT < 0.50) return_value -= 0.3; if (BOTTOM_RIGHT > 0.33) return_value -= 0.3; if (HEY_PART) return_value -= 0.2; return return_value; } double ho_recognize_font_1_gimal (const double *array_in) { double return_value = 0.0; if (LEFT_BOTTOM_EDGE) return_value += 0.1; if (RIGHT_BOTTOM_EDGE) return_value += 0.1; if (BIG_RIGHT_BOTTOM_EDGE) return_value += 0.1; if (MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) return_value += 0.1; if (TOP_LEFT > BOTTOM_LEFT) return_value += 0.1; if (TOP_RIGHT > BOTTOM_RIGHT) return_value += 0.1; if (BOTTOM_MID > 0.25 && BOTTOM_MID < 0.45) return_value += 0.1; if (TOP_LEFT > (BOTTOM_LEFT + 0.25)) return_value += 0.2; if (WIDTH < 0.3) return_value += 0.2; if (WIDTH < 0.3 && BOTTOM_HBAR && (BOTTOM_MID_CROSS == 0.1 || BOTTOM_RIGHT_CROSS == 0.1)) return_value += 0.2; if (BOTTOM_MID > 0.5) return_value -= 0.3; if (BOTTOM > 0.57 || BOTTOM < 43) return_value -= 0.10; if (BOTTOM < 0.43) return_value -= 0.3; if (!MID_BOTTOM_NOTCH && !RIGHT_BOTTOM_NOTCH) return_value -= 0.2; if (LEFT_VBAR) return_value -= 0.3; if (WIDTH > 0.34) return_value -= 0.2; if (WIDTH_BY_HEIGHT > 0.8) return_value -= 0.2; if (HEIGHT < 0.3) return_value -= 0.3; if (!RIGHT_BOTTOM_EDGE) return_value -= 0.2; return return_value; } double ho_recognize_font_1_dalet (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (RIGHT_VBAR || MID_VBAR) return_value += 0.2; if (TOP_RIGTH_EDGE) return_value += 0.1; if (BIG_TOP_RIGTH_EDGE) return_value += 0.1; if (RIGHT_BOTTOM_EDGE) return_value += 0.1; if (MID_LEFT > 0.9) return_value += 0.1; if (BOTTOM_HBAR) return_value -= 0.3; if (LEFT_VBAR) return_value -= 0.3; if (HEY_PART) return_value -= 0.3; if (BOTTOM < 0.43) return_value -= 0.3; if (!TOP_RIGTH_EDGE) return_value -= 0.2; if (BOTTOM > 0.57 || BOTTOM < 43) return_value -= 0.10; if (WIDTH_BY_HEIGHT < 0.60) return_value -= 0.3; if (MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) return_value -= 0.3; if (HEIGHT < 0.35) return_value -= 0.3; if (BOTTOM_LEFT < 0.9) return_value -= 0.3; if (WIDTH < 0.3) return_value -= 0.3; if (TOP_RIGHT > BOTTOM_RIGHT) return_value -= 0.1; if (TOP_RIGHT > MID_RIGHT) return_value -= 0.1; return return_value; } double ho_recognize_font_1_hey (const double *array_in) { double return_value = 0.0; if (HEY_PART) return_value += 0.2; if (TOP_LEFT_NOTCH || MID_LEFT_NOTCH) return_value += 0.15; if (TOP_HBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (BOTTOM < 0.45) return_value -= 0.3; if (BOTTOM > 0.6 || BOTTOM < 40) return_value -= 0.10; if (BOTTOM_HBAR) return_value -= 0.2; if (!HEY_PART) return_value -= 0.2; if (!TOP_HBAR) return_value -= 0.1; if (BIG_BOTTOM_LEFT_EDGE) return_value -= 0.2; return return_value; } double ho_recognize_font_1_vav (const double *array_in) { double return_value = 0.0; if (WIDTH < 0.4) return_value += 0.2; if (WIDTH < 0.27 || HEIGHT > 0.40) return_value += 0.2; if (WIDTH_BY_HEIGHT < 0.53) return_value += 0.1; if (RIGHT_VBAR || MID_VBAR) return_value += 0.1; if (BOTTOM < 0.58 && BOTTOM > 0.42) return_value += 0.1; if (TOP_RIGHT > (MID_RIGHT + 0.1)) return_value += 0.1; if (!TOP_MID_CROSS && !TOP_RIGHT_CROSS) return_value += 0.1; if (TOP_RIGTH_EDGE) return_value -= 0.1; if (BIG_TOP_RIGTH_EDGE) return_value -= 0.1; if (LEFT_BOTTOM_EDGE) return_value -= 0.1; if (BOTTOM_RIGTH_EDGE) return_value -= 0.1; if (MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) return_value -= 0.2; if (BOTTOM_HBAR) return_value -= 0.2; if (BOTTOM_HBAR && WIDTH_BY_HEIGHT > 0.35) return_value -= 0.2; if (BOTTOM > 0.57 || BOTTOM < 47) return_value -= 0.1; if (BOTTOM < 0.43) return_value -= 0.3; if (TOP < 0.35) return_value -= 0.3; if (TOP > 0.65) return_value -= 0.3; if (WIDTH > 0.25 && (MID_LEFT > (BOTTOM_LEFT + 0.2))) return_value -= 0.2; if (WIDTH > 0.35) return_value -= 0.2; if (WIDTH_BY_HEIGHT > 0.53) return_value -= 0.1; if (WIDTH_BY_HEIGHT > 0.60) return_value -= 0.2; if (DOT_PART) return_value -= 0.2; if (!BOTTOM_MID_END && !BOTTOM_RIGHT_END) return_value -= 0.2; if (HEIGHT < 0.35) return_value -= 0.3; if (WIDTH_BY_HEIGHT > 0.55) return_value -= 0.2; if (ONE_HOLE) return_value -= 0.2; if (DOT_PART) return_value -= 0.2; if (!RIGHT_VBAR) return_value -= 0.2; return return_value; } double ho_recognize_font_1_zayin (const double *array_in) { double return_value = 0.0; if (WIDTH < 0.3) return_value += 0.2; if (WIDTH_BY_HEIGHT < 0.53) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (MID_VBAR) return_value += 0.2; if (TOP_RIGTH_EDGE) return_value += 0.2; if (TOP_MID_CROSS || TOP_RIGHT_CROSS) return_value += 0.1; if (MID_RIGHT > MID_LEFT) return_value += 0.1; if (BOTTOM > 0.60) return_value -= 0.2; if (TOP < 0.35) return_value -= 0.3; if (BOTTOM > 0.57 || BOTTOM < 47) return_value -= 0.10; if (BOTTOM < 0.43) return_value -= 0.3; if (BOTTOM_HBAR) return_value -= 0.3; if (LEFT_BOTTOM_EDGE) return_value -= 0.1; if (MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) return_value -= 0.2; if (BOTTOM_HBAR) return_value -= 0.2; if (BOTTOM_LEFT < 0.2) return_value -= 0.2; if (MID_LEFT > 0.9) return_value -= 0.2; if (TOP_RIGHT > MID_RIGHT) return_value -= 0.2; if (DOT_PART) return_value -= 0.3; if (ONE_HOLE || TWO_HOLES) return_value -= 0.3; if (WIDTH_BY_HEIGHT > 0.63) return_value -= 0.2; if (TOP_MID_CROSS < 0.1 && TOP_RIGHT_CROSS < 0.1) return_value -= 0.1; if (HEIGHT < 0.3) return_value -= 0.2; return return_value; } double ho_recognize_font_1_het (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (LEFT_VBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (!BOTTOM_HBAR) return_value += 0.1; if (BOTTOM_LEFT < (MID_LEFT + 0.1)) return_value += 0.1; if (TWO_VLINES_DOWN) return_value += 0.1; if (!TOP_HBAR) return_value -= 0.1; if (!LEFT_VBAR) return_value -= 0.1; if (!RIGHT_VBAR) return_value -= 0.1; if (BOTTOM_HBAR) return_value -= 0.2; if (BOTTOM_LEFT_EDGE) return_value -= 0.2; if (BOTTOM_MID < 0.9) return_value -= 0.2; if (MID_TOP_NOTCH && TOP_MID > 0.2) return_value -= 0.3; if (BOTTOM_LEFT < (MID_LEFT + 0.1)) return_value -= 0.1; if (!TWO_VLINES_DOWN) return_value -= 0.3; if (RIGHT_TOP_EDGE) return_value -= 0.2; if (HEY_PART) return_value -= 0.2; if (ONE_HOLE) return_value -= 0.3; if (TOP_LEFT > (BOTTOM_LEFT + 0.1)) return_value -= 0.1; if (!BOTTOM_RIGHT_END) return_value -= 0.2; return return_value; } double ho_recognize_font_1_tet (const double *array_in) { int count_edges; int count_notches; double return_value = 0.0; count_edges = RIGHT_TOP_EDGE * 10.0 + MID_TOP_EDGE * 10.0 + LEFT_TOP_EDGE * 10; count_notches = RIGHT_TOP_NOTCH * 10.0 + MID_TOP_NOTCH * 10.0 + LEFT_TOP_NOTCH * 10; if (BOTTOM_HBAR) return_value += 0.1; if (LEFT_VBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (MID_TOP_NOTCH || LEFT_TOP_NOTCH) return_value += 0.2; if (MID_BOTTOM_EDGE) return_value += 0.1; if (!TOP_RIGHT_END) return_value += 0.1; if (count_edges == 2) return_value += 0.1; if (TOP_HBAR && !MID_TOP_NOTCH) return_value -= 0.1; if (BOTTOM_LEFT_EDGE) return_value -= 0.2; if (!MID_TOP_NOTCH) return_value -= 0.2; if (MID_BOTTOM_NOTCH) return_value -= 0.2; if (RIGHT_TOP_NOTCH && LEFT_TOP_NOTCH) return_value -= 0.2; if (!MID_TOP_NOTCH && !LEFT_TOP_NOTCH) return_value -= 0.2; if (LEFT_BOTTOM_NOTCH) return_value -= 0.2; if (MID_BOTTOM_NOTCH) return_value -= 0.2; if (count_edges != 2) return_value -= 0.1; if (count_edges == 3) return_value -= 0.1; if (count_notches > 1) return_value -= 0.2; if (HEIGHT > 0.55) return_value -= 0.2; if (BOTTOM_LEFT_END) return_value -= 0.2; if (TWO_HOLES) return_value -= 0.2; if (ONE_HOLE && !HOLE_RIGHT_TOP_EDGE) return_value -= 0.2; if (ONE_HOLE && HOLE_WIDTH < 0.3) return_value -= 0.2; if (ONE_HOLE && HOLE_BOTTOM_LEFT_EDGE) return_value -= 0.2; if (BOTTOM_LEFT_CROSS || BOTTOM_MID_CROSS) return_value -= 0.1; if (MID_LEFT > 0.5) return_value -= 0.2; return return_value; } double ho_recognize_font_1_yud (const double *array_in) { double return_value = 0.0; double height_by_width = HEIGHT / WIDTH; if (TOP < 0.53 && TOP > 0.47) return_value += 0.1; if (BOTTOM > 0.55) return_value += 0.1; if (WIDTH < 0.3) return_value += 0.1; if (HEIGHT < 0.35) return_value += 0.1; if (TOP_LEFT < 0.4) return_value += 0.1; if (TOP_HBAR) return_value += 0.1; if (MID_LEFT_NOTCH) return_value += 0.1; if (HEIGHT > 0.38) return_value -= 0.2; if (WIDTH > 0.4) return_value -= 0.2; if (TOP_LEFT > 0.8) return_value -= 0.1; if (BOTTOM < 0.58) return_value -= 0.2; if (TOP_LEFT > BOTTOM_LEFT * 1.5) return_value -= 0.3; if (LEFT_BOTTOM_EDGE) return_value -= 0.1; if (TOP < 0.3) return_value -= 0.2; if (height_by_width < 0.55) return_value -= 0.1; if (height_by_width < 0.35) return_value -= 0.2; return return_value; } double ho_recognize_font_1_caf (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (BOTTOM_HBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (MID_LEFT == 1 && MID_RIGHT < 0.2) return_value += 0.1; if (MID_LEFT_NOTCH) return_value += 0.1; if (!BOTTOM_RIGTH_EDGE) return_value += 0.1; if (BOTTOM_HBAR && BOTTOM_LEFT_END && !BOTTOM_RIGHT_END) return_value += 0.1; if (BIG_BOTTOM_RIGTH_EDGE) return_value -= 0.3; if (BOTTOM_RIGTH_EDGE) return_value -= 0.1; if ((MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) && (BOTTOM_RIGHT < 0.25)) return_value -= 0.2; if (BOTTOM_HBAR < 0.5) return_value -= 0.2; if (LEFT_VBAR) return_value -= 0.2; if (TOP_LEFT > (BOTTOM_LEFT + 0.25)) return_value -= 0.2; if (WIDTH_BY_HEIGHT < 0.50) return_value -= 0.3; if (MID_LEFT < 0.8) return_value -= 0.2; if (!BOTTOM_LEFT_END && BOTTOM_LEFT > 0.2) return_value -= 0.2; if (WIDTH < 0.3) return_value -= 0.3; if (TOP_RIGHT_END) return_value -= 0.2; if (MID_TOP_NOTCH || RIGHT_TOP_NOTCH) return_value -= 0.2; if (BOTTOM > 0.57 || BOTTOM < 43) return_value -= 0.20; return return_value; } double ho_recognize_font_1_caf_sofit (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (RIGHT_BOTTOM_EDGE) return_value += 0.1; if (MID_LEFT > 0.9) return_value += 0.1; if (BOTTOM < 0.45) return_value += 0.3; if (BOTTOM_HBAR) return_value -= 0.3; if (MID_HBAR) return_value -= 0.3; if (MID_MID_CROSS) return_value -= 0.3; if (LEFT_VBAR) return_value -= 0.3; if (MID_VBAR) return_value -= 0.1; if (HEY_PART) return_value -= 0.3; if (BOTTOM > 0.50) return_value -= 0.3; if (WIDTH < 0.3) return_value -= 0.3; if (HEIGHT < 0.52) return_value -= 0.3; if (ONE_HOLE) return_value -= 0.2; if (MID_LEFT < 0.9) return_value -= 0.2; if (BOTTOM_LEFT < 0.8) return_value -= 0.2; if (TOP_MID > 0.4) return_value -= 0.2; if (TWO_VLINES_UP) return_value -= 0.2; return return_value; } double ho_recognize_font_1_lamed (const double *array_in) { double return_value = 0.0; if (TOP > 0.6) return_value += 0.2; if (TOP_HBAR || MID_HBAR) return_value += 0.1; if (HEIGHT > 0.6) return_value += 0.2; if (TOP_RIGHT > 0.5) return_value += 0.2; if (TOP_LEFT < 0.2) return_value += 0.1; if (LEFT_VBAR) return_value -= 0.2; if (TOP < 0.51) return_value -= 0.2; if (!TOP_HBAR && !MID_HBAR) return_value -= 0.2; if (BOTTOM > 0.52) return_value -= 0.2; if (WIDTH_BY_HEIGHT < 0.35) return_value -= 0.2; if (WIDTH < 0.25) return_value -= 0.2; if (BOTTOM < 0.47) return_value -= 0.2; if (DOT_PART) return_value -= 0.2; if (HEY_PART) return_value -= 0.2; return return_value; } double ho_recognize_font_1_mem (const double *array_in) { double return_value = 0.0; if (TOP_LEFT_EDGE) return_value += 0.1; if (LEFT_TOP_EDGE) return_value += 0.1; if (LEFT_BOTTOM_NOTCH || MID_BOTTOM_NOTCH) return_value += 0.1; if (MID_LEFT_NOTCH) return_value += 0.1; if (TOP_LEFT_END) return_value += 0.1; if (BOTTOM_LEFT_END) return_value += 0.1; if (BOTTOM_MID_END) return_value += 0.1; if (TOP_MID_CROSS) return_value += 0.1; if ((MID_LEFT_END || BOTTOM_LEFT_END) && BOTTOM_MID_END) return_value += 0.1; if (DIAGONAL_BAR) return_value -= 0.1; if (TOP_HBAR) return_value -= 0.1; if (MID_RIGHT_NOTCH || BOTTOM_RIGHT_NOTCH) return_value -= 0.2; if (BOTTOM_RIGHT_END) return_value -= 0.2; if (BOTTOM > 0.60) return_value -= 0.2; if (BOTTOM_RIGHT > 0.35) return_value -= 0.3; if (BOTTOM_MID == 1) return_value -= 0.1; if (MID_LEFT > 0.9) return_value -= 0.2; return return_value; } double ho_recognize_font_1_mem_sofit (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (BOTTOM_HBAR) return_value += 0.2; if (LEFT_VBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (BOTTOM_LEFT < 0.25 && BOTTOM_RIGHT < 0.25 && BOTTOM_HBAR) return_value += 0.1; if ((BOTTOM_LEFT) > (BOTTOM_RIGHT + 0.2)) return_value += 0.1; if (BOTTOM_LEFT < 0.3 && BOTTOM_RIGHT < 0.3) return_value += 0.2; if (ONE_HOLE) return_value += 0.2; if ((BOTTOM_LEFT + 0.1) < (BOTTOM_RIGHT)) return_value -= 0.3; if (!ONE_HOLE) return_value -= 0.2; if (MID_LEFT > 0.7) return_value -= 0.3; if (BOTTOM_LEFT > 0.25 && BOTTOM_RIGHT > 0.30) return_value -= 0.1; if (BOTTOM_LEFT > 0.42 || BOTTOM_RIGHT > 0.45) return_value -= 0.2; if (BOTTOM_RIGHT > 0.42) return_value -= 0.1; if (BOTTOM > 0.57 || BOTTOM < 43) return_value -= 0.10; if (MID_TOP_NOTCH) return_value -= 0.2; if (!TOP_HBAR) return_value -= 0.3; if (TOP_LEFT > 0.4) return_value -= 0.2; return return_value; } double ho_recognize_font_1_nun (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (BOTTOM_HBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (MID_LEFT_NOTCH) return_value += 0.1; if (MID_LEFT == 1 && WIDTH < 0.3) return_value += 0.1; if (!BOTTOM_RIGTH_EDGE) return_value += 0.1; if (TOP_LEFT > (BOTTOM_LEFT + 0.25)) return_value += 0.2; if (WIDTH < 0.3) return_value += 0.2; if (WIDTH < 0.3 && BOTTOM_HBAR && BOTTOM_MID_CROSS < 0.1 && BOTTOM_RIGHT_CROSS < 0.1) return_value += 0.2; if (BOTTOM_MID > 0.25) return_value -= 0.2; if (MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) return_value -= 0.3; if (BOTTOM_HBAR < 0.5) return_value -= 0.2; if (LEFT_VBAR) return_value -= 0.2; if (MID_LEFT_EDGE) return_value -= 0.2; if (BIG_TOP_RIGTH_EDGE) return_value -= 0.2; if (BIG_RIGHT_BOTTOM_EDGE) return_value -= 0.2; if (WIDTH > 0.33 && (TOP_LEFT < (BOTTOM_LEFT + 0.2))) return_value -= 0.35; if (TOP_LEFT < (BOTTOM_LEFT)) return_value -= 0.2; if (TOP_LEFT < (BOTTOM_LEFT + 0.2)) return_value -= 0.2; if (MID_LEFT < 0.6) return_value -= 0.3; if (BOTTOM > 0.60) return_value -= 0.2; if (BOTTOM < 0.43) return_value -= 0.2; if (MID_LEFT_END || MID_MID_END) return_value -= 0.3; if (HEIGHT > 0.55) return_value -= 0.2; if (HEIGHT < 0.3) return_value -= 0.2; if (WIDTH_BY_HEIGHT < 0.25) return_value -= 0.3; if (WIDTH < 0.15) return_value -= 0.3; if (MID_RIGHT > 0.9) return_value -= 0.3; return return_value; } double ho_recognize_font_1_nun_sofit (const double *array_in) { double return_value = 0.0; if (WIDTH < 0.3) return_value += 0.2; if (WIDTH_BY_HEIGHT < 0.45) return_value += 0.2; if (RIGHT_VBAR || MID_VBAR) return_value += 0.2; if (BOTTOM < 0.45) return_value += 0.3; if (HEIGHT > 0.53) return_value += 0.1; if (HEIGHT > 0.63) return_value += 0.1; if (BOTTOM_RIGTH_EDGE) return_value += 0.1; if (TOP_RIGTH_EDGE) return_value -= 0.1; if (LEFT_BOTTOM_EDGE) return_value -= 0.1; if (MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) return_value -= 0.2; if (BOTTOM_HBAR) return_value -= 0.2; if (HEIGHT < 0.5) return_value -= 0.3; if (BOTTOM > 0.0) return_value -= 0.2; if (WIDTH_BY_HEIGHT > 0.38) return_value -= 0.3; if (BOTTOM_LEFT < 0.15) return_value -= 0.1; if (MID_RIGHT > 0.75) return_value += 0.1; if (TOP_LEFT > 0.75) return_value -= 0.1; if ((BOTTOM_LEFT + 0.2) < BOTTOM_RIGHT) return_value -= 0.2; return return_value; } double ho_recognize_font_1_samech (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (BOTTOM_HBAR) return_value += 0.1; if (LEFT_VBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (BOTTOM_RIGHT > 0.45) return_value += 0.1; if (BOTTOM_LEFT > 0.45 || BOTTOM_RIGHT > 0.45) return_value += 0.1; if ((BOTTOM_LEFT + 0.3) < (BOTTOM_RIGHT)) return_value += 0.1; if (BOTTOM_LEFT > 0.30 && BOTTOM_RIGHT > 0.30) return_value += 0.1; if (ONE_HOLE) return_value += 0.2; if ((BOTTOM_LEFT) > (BOTTOM_RIGHT)) return_value -= 0.3; if (BOTTOM_LEFT < 0.2 && BOTTOM_RIGHT < 0.2) return_value -= 0.3; if (BOTTOM_LEFT < 0.12) return_value -= 0.3; if (!ONE_HOLE) return_value -= 0.3; if (ONE_HOLE && HOLE_WIDTH < 0.17) return_value -= 0.3; if (TWO_HOLES) return_value -= 0.3; if (LEFT_BOTTOM_EDGE && RIGHT_BOTTOM_EDGE) return_value -= 0.2; if (MID_TOP_NOTCH) return_value -= 0.2; if (WIDTH_BY_HEIGHT < 0.60) return_value -= 0.3; if (!TOP_HBAR) return_value -= 0.3; if (TOP_LEFT > 0.4) return_value -= 0.2; if (MID_LEFT > 0.4) return_value -= 0.2; if (MID_LEFT_NOTCH && BOTTOM_LEFT < 0.15) return_value -= 0.1; if (MID_TOP_NOTCH) return_value -= 0.1; if (BOTTOM_LEFT_NOTCH) return_value -= 0.1; if (BOTTOM_MID_CROSS) return_value -= 0.2; if (BOTTOM_LEFT_END) return_value -= 0.2; if (BOTTOM_RIGHT < 0.32) return_value -= 0.3; if (TOP < 0.35) return_value -= 0.2; return return_value; } double ho_recognize_font_1_ayin (const double *array_in) { double return_value = 0.0; if (TWO_VLINES_UP) return_value += 0.1; if (BOTTOM_LEFT_EDGE) return_value += 0.1; if (BOTTOM_LEFT < BOTTOM_RIGHT) return_value += 0.1; if (MID_TOP_NOTCH) return_value += 0.1; if (MID_LEFT_NOTCH || BOTTOM_LEFT_NOTCH) return_value += 0.1; if (MID_TOP_NOTCH) return_value += 0.1; if ((TOP_RIGHT + 0.15) < BOTTOM_RIGHT) return_value += 0.1; if (BOTTOM_LEFT_END) return_value += 0.1; if (MID_BOTTOM_NOTCH) return_value -= 0.2; if (MID_RIGHT_NOTCH || BOTTOM_RIGHT_NOTCH) return_value -= 0.2; if (TOP_HBAR) return_value -= 0.3; if (LEFT_BOTTOM_NOTCH) return_value -= 0.2; if (!BOTTOM_LEFT_END) return_value -= 0.2; if (MID_RIGHT_NOTCH) return_value -= 0.1; if (MID_RIGHT > 0.51 && BOTTOM_RIGHT < 0.2) return_value -= 0.1; if (BOTTOM > 0.55) return_value -= 0.2; if (HEY_PART) return_value -= 0.2; if (BOTTOM_LEFT > 0.3) return_value -= 0.2; if (BOTTOM_RIGHT < 0.3) return_value -= 0.1; if (BOTTOM_MID > 0.85) return_value -= 0.1; if (TOP > 0.56) return_value -= 0.2; if (MID_LEFT > 0.9) return_value -= 0.2; if (WIDTH < 0.3) return_value -= 0.2; if (HEIGHT < 0.35) return_value -= 0.2; return return_value; } double ho_recognize_font_1_pey (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.15; if (BOTTOM_HBAR) return_value += 0.15; if (RIGHT_VBAR) return_value += 0.15; if (BOTTOM_LEFT_NOTCH) return_value += 0.15; if (MID_LEFT < 0.3) return_value += 0.15; if (MID_LEFT_END || MID_MID_END) return_value += 0.2; if (MID_LEFT_CROSS && MID_MID_END) return_value += 0.2; if (BOTTOM_LEFT_END) return_value += 0.1; if (ONE_HOLE && HOLE_BOTTOM_LEFT_EDGE) return_value += 0.1; if (HEIGHT < 0.45) return_value -= 0.3; if (LEFT_VBAR) return_value -= 0.1; if (BOTTOM_RIGTH_EDGE) return_value -= 0.3; if (MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) return_value -= 0.3; if (BOTTOM_HBAR < 0.5) return_value -= 0.2; if (TOP_LEFT_END && !TOP_LEFT_CROSS) return_value -= 0.3; if (WIDTH_BY_HEIGHT < 0.60) return_value -= 0.3; if (!BOTTOM_LEFT_NOTCH) return_value -= 0.3; if (MID_TOP_NOTCH) return_value -= 0.3; if ((TOP_RIGHT + 0.2) < BOTTOM_RIGHT) return_value -= 0.2; if (ONE_HOLE && HOLE_TOP_LEFT > (HOLE_BOTTOM_LEFT + 0.1)) return_value -= 0.2; if (ONE_HOLE && (!HOLE_TOP_LEFT_EDGE && !HOLE_BOTTOM_LEFT_EDGE)) return_value -= 0.2; if (!MID_LEFT_END && !MID_MID_END && !MID_RIGHT_CROSS) return_value -= 0.2; return return_value; } double ho_recognize_font_1_pey_sofit (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (RIGHT_BOTTOM_EDGE) return_value += 0.1; if (BOTTOM < 0.47) return_value += 0.2; if ((!TOP_LEFT_END && !TOP_MID_END) || TOP_LEFT_CROSS) return_value += 0.2; if (HEIGHT > 0.51) return_value += 0.1; if (TWO_VLINES_UP) return_value += 0.1; if (BOTTOM_HBAR) return_value -= 0.3; if (LEFT_VBAR) return_value -= 0.3; if (MID_VBAR) return_value -= 0.1; if (MID_LEFT == 1.0) return_value -= 0.2; if (HEY_PART) return_value -= 0.3; if (BOTTOM > 0.50) return_value -= 0.3; if (WIDTH < 0.3) return_value -= 0.3; if (TOP_LEFT_END && !TOP_LEFT_CROSS) return_value -= 0.3; if (HEIGHT < 0.5) return_value -= 0.3; if (BOTTOM > 0.50) return_value -= 0.2; if (WIDTH_BY_HEIGHT < 0.45) return_value -= 0.3; if (BOTTOM_LEFT < 0.75) return_value -= 0.3; if (!BOTTOM_RIGHT_END) return_value -= 0.2; if (BOTTOM_MID_END) return_value -= 0.2; return return_value; } double ho_recognize_font_1_tzadi (const double *array_in) { double return_value = 0.0; if (DIAGONAL_BAR) return_value += 0.2; if (TWO_VLINES_UP) return_value += 0.1; if (BOTTOM_LEFT_EDGE) return_value += 0.1; if (BOTTOM_RIGTH_EDGE) return_value += 0.1; if (BOTTOM_LEFT < BOTTOM_RIGHT) return_value += 0.1; if (MID_RIGHT_NOTCH || BOTTOM_RIGHT_NOTCH) return_value += 0.2; if (MID_MID_CROSS) return_value += 0.1; if (BOTTOM_LEFT < BOTTOM_RIGHT) return_value -= 0.1; if (MID_BOTTOM_NOTCH) return_value -= 0.2; if (!BOTTOM_HBAR) return_value -= 0.2; if (LEFT_BOTTOM_NOTCH) return_value -= 0.2; if (BOTTOM_RIGHT_END) return_value -= 0.2; if (!BOTTOM_LEFT_END) return_value -= 0.2; if (!MID_RIGHT_NOTCH && !BOTTOM_RIGHT_NOTCH) return_value -= 0.2; if (!MID_MID_CROSS && !BOTTOM_RIGHT_CROSS) return_value -= 0.2; if (WIDTH < 0.3) return_value -= 0.2; if (!TOP_RIGHT_END) return_value -= 0.2; if (MID_LEFT_END) return_value -= 0.2; return return_value; } double ho_recognize_font_1_tzadi_sofit (const double *array_in) { double return_value = 0.0; if (RIGHT_VBAR || LEFT_VBAR) return_value += 0.1; if (BOTTOM < 0.47) return_value += 0.3; if (LEFT_TOP_EDGE) return_value += 0.1; if (RIGHT_TOP_EDGE) return_value += 0.1; if (TOP_MID_CROSS || MID_MID_CROSS) return_value += 0.1; if (BOTTOM_HBAR) return_value -= 0.3; if (HEY_PART) return_value -= 0.3; if (BOTTOM > 0.51) return_value -= 0.3; if (WIDTH < 0.3) return_value -= 0.3; if (BOTTOM_LEFT_EDGE) return_value -= 0.3; if (TWO_VLINES_DOWN) return_value -= 0.3; if (HEIGHT < 0.5) return_value -= 0.3; if (TOP_HBAR) return_value -= 0.2; return return_value; } double ho_recognize_font_1_kuf (const double *array_in) { double return_value = 0.0; if (HEY_PART) return_value += 0.2; if (TOP_LEFT_NOTCH) return_value += 0.1; if (TOP_HBAR) return_value += 0.1; if (BOTTOM < 0.47) return_value += 0.3; if (BOTTOM_LEFT_END) return_value += 0.1; if (BOTTOM_LEFT > (BOTTOM_RIGHT - 0.2)) return_value -= 0.2; if (BOTTOM_RIGHT < 0.3) return_value -= 0.2; if (HEIGHT < 0.53) return_value -= 0.2; if (BOTTOM > 0.45) return_value -= 0.3; if (WIDTH_BY_HEIGHT < 0.60) return_value -= 0.3; if (!TOP_HBAR) return_value -= 0.1; if (BOTTOM_RIGTH_EDGE > 0.1) return_value -= 0.1; if (BOTTOM_HBAR) return_value -= 0.1; if (!TOP_HBAR) return_value -= 0.15; return return_value; } double ho_recognize_font_1_resh (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (!BOTTOM_HBAR) return_value += 0.1; if (!LEFT_VBAR) return_value += 0.1; if (!TOP_RIGTH_EDGE) return_value += 0.1; if (RIGHT_BOTTOM_EDGE) return_value += 0.1; if (BOTTOM_HBAR) return_value -= 0.3; if (MID_BOTTOM_NOTCH || RIGHT_BOTTOM_NOTCH) return_value -= 0.2; if (LEFT_VBAR) return_value -= 0.3; if (MID_VBAR) return_value -= 0.1; if (HEY_PART) return_value -= 0.3; if (BOTTOM > 0.60) return_value -= 0.3; if (BOTTOM < 0.45) return_value -= 0.3; if (TOP_RIGTH_EDGE) return_value -= 0.1; if (WIDTH < 0.3) return_value -= 0.3; if (WIDTH_BY_HEIGHT < 0.6) return_value -= 0.3; if (TWO_VLINES_DOWN) return_value -= 0.3; if (BOTTOM_LEFT < 0.9) return_value -= 0.3; if (MID_LEFT < 0.9) return_value -= 0.3; if (WIDTH < 0.35 || HEIGHT < 0.35) return_value -= 0.2; if (WIDTH < 0.25) return_value -= 0.2; return return_value; } double ho_recognize_font_1_shin (const double *array_in) { int count_edges; int count_notches; double return_value = 0.0; count_edges = RIGHT_TOP_EDGE * 10.0 + MID_TOP_EDGE * 10.0 + LEFT_TOP_EDGE * 10; count_notches = RIGHT_TOP_NOTCH * 10.0 + MID_TOP_NOTCH * 10.0 + LEFT_TOP_NOTCH * 10; if (TWO_HOLES) return_value += 0.3; if (THREE_VLINES_UP) return_value += 0.3; if (LEFT_TOP_NOTCH) return_value += 0.1; if (RIGHT_TOP_NOTCH) return_value += 0.1; if (LEFT_TOP_EDGE) return_value += 0.1; if (RIGHT_TOP_EDGE) return_value += 0.1; if (count_edges == 3) return_value += 0.2; if (count_notches == 2) return_value += 0.2; if (BOTTOM_MID_CROSS) return_value += 0.2; if (BOTTOM_LEFT_CROSS) return_value += 0.2; if (MID_BOTTOM_NOTCH) return_value -= 0.2; if (!RIGHT_TOP_NOTCH && !MID_TOP_NOTCH) return_value -= 0.2; if (count_edges != 3) return_value -= 0.1; return return_value; } double ho_recognize_font_1_tav (const double *array_in) { double return_value = 0.0; if (TOP_HBAR) return_value += 0.1; if (LEFT_VBAR) return_value += 0.1; if (RIGHT_VBAR) return_value += 0.1; if (BIG_BOTTOM_LEFT_EDGE) return_value += 0.2; if (BOTTOM_LEFT_EDGE) return_value += 0.2; if (TOP_LEFT > (BOTTOM_LEFT + 0.15)) return_value += 0.1; if (BOTTOM_HBAR) return_value -= 0.2; if (!BOTTOM_LEFT_EDGE) return_value -= 0.3; if (BOTTOM_MID < 0.9) return_value -= 0.2; if (MID_TOP_NOTCH || RIGHT_TOP_NOTCH) return_value -= 0.1; if (TOP_RIGHT_NOTCH || MID_RIGHT_NOTCH) return_value -= 0.1; if (WIDTH_BY_HEIGHT < 0.3) return_value -= 0.3; if (BOTTOM_LEFT > 0.8) return_value -= 0.3; if (BOTTOM_LEFT < (MID_LEFT + 0.1)) return_value -= 0.2; if (HEY_PART) return_value -= 0.1; if (WIDTH < 0.3) return_value -= 0.2; if (HEIGHT < 0.35) return_value -= 0.2; return return_value; } libhocr-0.10.17/src/fonts/ho_recognize_font_2.c0000644000175000017500000001615411051626100016230 00000000000000 /*************************************************************************** * ho_recognize_font_2.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" #include "ho_recognize.h" #include "ho_recognize_font_2.h" /* font recognition functions */ /* functions get an array of doubles 0..1 and return a double 0..1 * 0 if this does not look like the font until 1 looks exactly like the font */ double ho_recognize_font_2_zero (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_one (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_two (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_three (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_four (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_five (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_six (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_seven (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_eight (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_nine (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_minus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_plus (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_div (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_open (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_close (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_tag (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_two_tags (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_question (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_exclem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_dot_dot (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_dot_comma (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_alef (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_bet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_gimal (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_dalet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_hey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_vav (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_zayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_het (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_tet (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_yud (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_caf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_caf_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_lamed (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_mem (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_mem_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_nun (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_nun_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_samech (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_ayin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_pey (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_pey_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_tzadi (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_tzadi_sofit (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_kuf (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_resh (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_shin (const double *array_in) { double return_value = 0.0; return return_value; } double ho_recognize_font_2_tav (const double *array_in) { double return_value = 0.0; return return_value; } libhocr-0.10.17/src/fonts/ho_recognize_font_2.h0000644000175000017500000001013311017002613016223 00000000000000 /*************************************************************************** * ho_recognize_font_2.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_recognize_font_2.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_RECOGNIZE_FONT_2_H #define HO_RECOGNIZE_FONT_2_H 1 double ho_recognize_font_2_zero (const double *array_in); double ho_recognize_font_2_one (const double *array_in); double ho_recognize_font_2_two (const double *array_in); double ho_recognize_font_2_three (const double *array_in); double ho_recognize_font_2_four (const double *array_in); double ho_recognize_font_2_five (const double *array_in); double ho_recognize_font_2_six (const double *array_in); double ho_recognize_font_2_seven (const double *array_in); double ho_recognize_font_2_eight (const double *array_in); double ho_recognize_font_2_nine (const double *array_in); double ho_recognize_font_2_dot (const double *array_in); double ho_recognize_font_2_comma (const double *array_in); double ho_recognize_font_2_open (const double *array_in); double ho_recognize_font_2_close (const double *array_in); double ho_recognize_font_2_minus (const double *array_in); double ho_recognize_font_2_plus (const double *array_in); double ho_recognize_font_2_div (const double *array_in); double ho_recognize_font_2_tag (const double *array_in); double ho_recognize_font_2_two_tags (const double *array_in); double ho_recognize_font_2_question (const double *array_in); double ho_recognize_font_2_exclem (const double *array_in); double ho_recognize_font_2_dot_dot (const double *array_in); double ho_recognize_font_2_dot_comma (const double *array_in); double ho_recognize_font_2_alef (const double *array_in); double ho_recognize_font_2_bet (const double *array_in); double ho_recognize_font_2_gimal (const double *array_in); double ho_recognize_font_2_dalet (const double *array_in); double ho_recognize_font_2_hey (const double *array_in); double ho_recognize_font_2_vav (const double *array_in); double ho_recognize_font_2_zayin (const double *array_in); double ho_recognize_font_2_het (const double *array_in); double ho_recognize_font_2_tet (const double *array_in); double ho_recognize_font_2_yud (const double *array_in); double ho_recognize_font_2_caf (const double *array_in); double ho_recognize_font_2_caf_sofit (const double *array_in); double ho_recognize_font_2_lamed (const double *array_in); double ho_recognize_font_2_mem (const double *array_in); double ho_recognize_font_2_mem_sofit (const double *array_in); double ho_recognize_font_2_nun (const double *array_in); double ho_recognize_font_2_nun_sofit (const double *array_in); double ho_recognize_font_2_samech (const double *array_in); double ho_recognize_font_2_ayin (const double *array_in); double ho_recognize_font_2_pey (const double *array_in); double ho_recognize_font_2_pey_sofit (const double *array_in); double ho_recognize_font_2_tzadi (const double *array_in); double ho_recognize_font_2_tzadi_sofit (const double *array_in); double ho_recognize_font_2_kuf (const double *array_in); double ho_recognize_font_2_resh (const double *array_in); double ho_recognize_font_2_shin (const double *array_in); double ho_recognize_font_2_tav (const double *array_in); #endif /* HO_RECOGNIZE_FONT_2_H */ libhocr-0.10.17/src/fonts/ho_recognize_font_3.h0000644000175000017500000001013311017002613016224 00000000000000 /*************************************************************************** * ho_recognize_font_3.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_recognize_font_3.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_RECOGNIZE_FONT_3_H #define HO_RECOGNIZE_FONT_3_H 1 double ho_recognize_font_3_zero (const double *array_in); double ho_recognize_font_3_one (const double *array_in); double ho_recognize_font_3_two (const double *array_in); double ho_recognize_font_3_three (const double *array_in); double ho_recognize_font_3_four (const double *array_in); double ho_recognize_font_3_five (const double *array_in); double ho_recognize_font_3_six (const double *array_in); double ho_recognize_font_3_seven (const double *array_in); double ho_recognize_font_3_eight (const double *array_in); double ho_recognize_font_3_nine (const double *array_in); double ho_recognize_font_3_dot (const double *array_in); double ho_recognize_font_3_comma (const double *array_in); double ho_recognize_font_3_open (const double *array_in); double ho_recognize_font_3_close (const double *array_in); double ho_recognize_font_3_minus (const double *array_in); double ho_recognize_font_3_plus (const double *array_in); double ho_recognize_font_3_div (const double *array_in); double ho_recognize_font_3_tag (const double *array_in); double ho_recognize_font_3_two_tags (const double *array_in); double ho_recognize_font_3_question (const double *array_in); double ho_recognize_font_3_exclem (const double *array_in); double ho_recognize_font_3_dot_dot (const double *array_in); double ho_recognize_font_3_dot_comma (const double *array_in); double ho_recognize_font_3_alef (const double *array_in); double ho_recognize_font_3_bet (const double *array_in); double ho_recognize_font_3_gimal (const double *array_in); double ho_recognize_font_3_dalet (const double *array_in); double ho_recognize_font_3_hey (const double *array_in); double ho_recognize_font_3_vav (const double *array_in); double ho_recognize_font_3_zayin (const double *array_in); double ho_recognize_font_3_het (const double *array_in); double ho_recognize_font_3_tet (const double *array_in); double ho_recognize_font_3_yud (const double *array_in); double ho_recognize_font_3_caf (const double *array_in); double ho_recognize_font_3_caf_sofit (const double *array_in); double ho_recognize_font_3_lamed (const double *array_in); double ho_recognize_font_3_mem (const double *array_in); double ho_recognize_font_3_mem_sofit (const double *array_in); double ho_recognize_font_3_nun (const double *array_in); double ho_recognize_font_3_nun_sofit (const double *array_in); double ho_recognize_font_3_samech (const double *array_in); double ho_recognize_font_3_ayin (const double *array_in); double ho_recognize_font_3_pey (const double *array_in); double ho_recognize_font_3_pey_sofit (const double *array_in); double ho_recognize_font_3_tzadi (const double *array_in); double ho_recognize_font_3_tzadi_sofit (const double *array_in); double ho_recognize_font_3_kuf (const double *array_in); double ho_recognize_font_3_resh (const double *array_in); double ho_recognize_font_3_shin (const double *array_in); double ho_recognize_font_3_tav (const double *array_in); #endif /* HO_RECOGNIZE_FONT_3_H */ libhocr-0.10.17/src/fonts/ho_recognize_font_6.h0000644000175000017500000001013311017002613016227 00000000000000 /*************************************************************************** * ho_recognize_font_6.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_recognize_font_6.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_RECOGNIZE_FONT_6_H #define HO_RECOGNIZE_FONT_6_H 1 double ho_recognize_font_6_zero (const double *array_in); double ho_recognize_font_6_one (const double *array_in); double ho_recognize_font_6_two (const double *array_in); double ho_recognize_font_6_three (const double *array_in); double ho_recognize_font_6_four (const double *array_in); double ho_recognize_font_6_five (const double *array_in); double ho_recognize_font_6_six (const double *array_in); double ho_recognize_font_6_seven (const double *array_in); double ho_recognize_font_6_eight (const double *array_in); double ho_recognize_font_6_nine (const double *array_in); double ho_recognize_font_6_dot (const double *array_in); double ho_recognize_font_6_comma (const double *array_in); double ho_recognize_font_6_open (const double *array_in); double ho_recognize_font_6_close (const double *array_in); double ho_recognize_font_6_minus (const double *array_in); double ho_recognize_font_6_plus (const double *array_in); double ho_recognize_font_6_div (const double *array_in); double ho_recognize_font_6_tag (const double *array_in); double ho_recognize_font_6_two_tags (const double *array_in); double ho_recognize_font_6_question (const double *array_in); double ho_recognize_font_6_exclem (const double *array_in); double ho_recognize_font_6_dot_dot (const double *array_in); double ho_recognize_font_6_dot_comma (const double *array_in); double ho_recognize_font_6_alef (const double *array_in); double ho_recognize_font_6_bet (const double *array_in); double ho_recognize_font_6_gimal (const double *array_in); double ho_recognize_font_6_dalet (const double *array_in); double ho_recognize_font_6_hey (const double *array_in); double ho_recognize_font_6_vav (const double *array_in); double ho_recognize_font_6_zayin (const double *array_in); double ho_recognize_font_6_het (const double *array_in); double ho_recognize_font_6_tet (const double *array_in); double ho_recognize_font_6_yud (const double *array_in); double ho_recognize_font_6_caf (const double *array_in); double ho_recognize_font_6_caf_sofit (const double *array_in); double ho_recognize_font_6_lamed (const double *array_in); double ho_recognize_font_6_mem (const double *array_in); double ho_recognize_font_6_mem_sofit (const double *array_in); double ho_recognize_font_6_nun (const double *array_in); double ho_recognize_font_6_nun_sofit (const double *array_in); double ho_recognize_font_6_samech (const double *array_in); double ho_recognize_font_6_ayin (const double *array_in); double ho_recognize_font_6_pey (const double *array_in); double ho_recognize_font_6_pey_sofit (const double *array_in); double ho_recognize_font_6_tzadi (const double *array_in); double ho_recognize_font_6_tzadi_sofit (const double *array_in); double ho_recognize_font_6_kuf (const double *array_in); double ho_recognize_font_6_resh (const double *array_in); double ho_recognize_font_6_shin (const double *array_in); double ho_recognize_font_6_tav (const double *array_in); #endif /* HO_RECOGNIZE_FONT_6_H */ libhocr-0.10.17/src/ho_dimentions.c0000644000175000017500000003177511051626217014033 00000000000000 /*************************************************************************** * ho_dimentions.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_dimentions.h" #include "ho_segment.h" int ho_dimentions_font_width_height_nikud (ho_bitmap * m, const int min_height, const int max_height, const int min_width, const int max_width) { int return_val; ho_objmap *m_obj = NULL; int height; int width; unsigned char nikud; /* create an object map from b/w image */ m_obj = ho_objmap_new_from_bitmap (m); if (!m_obj) return TRUE; /* get fonts size */ return_val = ho_objmap_font_metrix (m_obj, min_height, max_height, min_width, max_width, &height, &width, &nikud); ho_objmap_free (m_obj); m->font_width = width; m->font_height = height; m->nikud = nikud; return return_val; } int ho_dimentions_line_spacing (ho_bitmap * m) { int return_val; ho_objmap *m_obj = NULL; ho_bitmap *m_clean = NULL; ho_bitmap *m_temp1 = NULL; ho_bitmap *m_temp2 = NULL; int x, y; int width; int height; unsigned char nikud_ret; int font_height = m->font_height; int font_width = m->font_width; unsigned char nikud = m->nikud; /* if nikud we need to be more careful */ if (nikud) m_clean = ho_bitmap_filter_by_size (m, font_height / 2, font_height * 4, font_width / 3, font_width * 5); else m_clean = ho_bitmap_filter_by_size (m, font_height / 4, font_height * 4, font_width / 4, font_width * 5); /* get common height betwine lines */ m_temp1 = ho_bitmap_hlink (m_clean, font_width * 4); if (!m_temp1) return TRUE; ho_bitmap_free (m_clean); m_temp2 = ho_bitmap_vlink (m_temp1, font_height * 4); if (!m_temp2) return TRUE; ho_bitmap_andnot (m_temp2, m_temp1); ho_bitmap_free (m_temp1); /* cut the betwine lines objects to word size objects */ for (x = font_width * 3; x < m->width; x += font_width * 3 + 2) for (y = 0; y < m->height; y++) ho_bitmap_unset (m_temp2, x, y); /* create an object map from b/w image */ m_obj = ho_objmap_new_from_bitmap (m_temp2); ho_bitmap_free (m_temp2); /* get interline size */ return_val = ho_objmap_font_metrix (m_obj, font_height / 2, font_height * 4, font_width * 2, font_width * 4, &height, &width, &nikud_ret); ho_objmap_free (m_obj); /* sanity chack */ if (height < font_height || height > font_height * 4) height = font_height * 1.5; m->line_spacing = height; return return_val; } int ho_dimentions_font_spacing (ho_bitmap * m, const ho_bitmap * m_line_map) { int font_spacing = 0; ho_objmap *o_obj = NULL; ho_bitmap *m_temp; ho_bitmap *m_out; int n_fonts_free; int n_fonts_block; int x, y, i; /* chop of big/smal and out of line thigs */ m_temp = ho_bitmap_filter_by_size (m, m->font_height / 6, m->font_height * 3, m->font_width / 8, 3 * m->font_width); if (!m_temp) return TRUE; ho_bitmap_and (m_temp, m_line_map); m_out = m_temp; /* count ~number of fonts */ n_fonts_free = ho_bitmap_filter_count_objects (m_out); /* get inter font spacing */ m_temp = ho_bitmap_set_height (m_out, m->font_height * 2, m->font_height, m->font_height); ho_bitmap_free (m_out); if (!m_temp) return TRUE; m_out = m_temp; m_temp = ho_bitmap_clone (m_line_map); if (!m_temp) return TRUE; ho_bitmap_and (m_temp, m_out); ho_bitmap_free (m_out); m_out = m_temp; m_temp = ho_bitmap_hlink (m_out, m->font_width / 4); if (!m_temp) return TRUE; ho_bitmap_free (m_out); m_out = m_temp; /* look for zero width font spacing */ n_fonts_block = ho_bitmap_filter_count_objects (m_out); if (n_fonts_block < 4 * n_fonts_free / 5) { /* zero font spacing */ m->font_spacing = 0; ho_bitmap_free (m_out); return FALSE; } m_temp = ho_bitmap_clone (m_line_map); ho_bitmap_andnot (m_temp, m_out); ho_bitmap_free (m_out); if (!m_temp) return TRUE; m_out = m_temp; m_temp = ho_bitmap_filter_by_size (m_out, 5, m->height, 1, m->font_width / 2); ho_bitmap_free (m_out); if (!m_temp) return TRUE; m_out = m_temp; /* cut the betwine lines objects to word size objects */ for (y = m->font_height; y < m->height; y += m->font_height / 5 + 2) for (x = 0; x < m->width; x++) ho_bitmap_unset (m_out, x, y); /* create an object map from b/w image */ o_obj = ho_objmap_new_from_bitmap (m_out); ho_bitmap_free (m_out); if (!o_obj) return TRUE; if (ho_objmap_get_size (o_obj) < 4) { /* big font spacing */ m->font_spacing = 255; ho_objmap_free (o_obj); return FALSE; } /* normal font spacing */ for (i = 0; i < ho_objmap_get_size (o_obj); i++) if (font_spacing < ho_objmap_get_object (o_obj, i).width) font_spacing = ho_objmap_get_object (o_obj, i).width; if (font_spacing < m->font_width / 5) font_spacing = m->font_width / 5; m->font_spacing = font_spacing; ho_objmap_free (o_obj); return FALSE; } int ho_dimentions_line_fill (ho_bitmap * m, const ho_bitmap * m_line_map) { ho_bitmap *m_temp; int avg_line_fill; int com_line_fill; int *line_fill; int *line_fill_hist; int counter; int x, y; int line_height; int cell_size_for_common_fill_hist = 3; /* get line_height */ x = m_line_map->width / 2; for (y = 0; y < m_line_map->height && !ho_bitmap_get (m_line_map, x, y); y++) ; line_height = y; for (; y < m_line_map->height && ho_bitmap_get (m_line_map, x, y); y++) ; line_height = y - line_height; /* create a fill arrays fill with {0, 0 ... } */ line_fill = (int *) calloc (m->width, sizeof (int)); if (!line_fill) return TRUE; line_fill_hist = (int *) malloc (m->height / cell_size_for_common_fill_hist * sizeof (int)); if (!line_fill_hist) return TRUE; /* fill hist with max value */ for (y = 0; y < m->height / cell_size_for_common_fill_hist; y++) { line_fill_hist[y] = line_height; } /* chop of none line thigs */ m_temp = ho_bitmap_clone (m); if (!m_temp) return TRUE; ho_bitmap_and (m_temp, m_line_map); /* get line fill data */ avg_line_fill = 0; counter = 0; for (x = 0; x < m->width; x++) { for (y = 0; y < m->height; y++) { line_fill[x] += ho_bitmap_get (m_temp, x, y); } avg_line_fill += line_fill[x]; if (line_fill[x]) counter++; } /* we do not need the temp text bitmap */ ho_bitmap_free (m_temp); if (!counter) { return TRUE; } /* fill common fill histogram */ for (y = cell_size_for_common_fill_hist + 1; y < m->height; y++) { for (x = 0; x < m->width; x++) if (line_fill[x] / cell_size_for_common_fill_hist == y / cell_size_for_common_fill_hist) line_fill_hist[y / cell_size_for_common_fill_hist]++; } /* get the most common fill */ com_line_fill = 1; for (y = 1; y < line_height / cell_size_for_common_fill_hist; y++) { if (line_fill_hist[com_line_fill] < line_fill_hist[y]) com_line_fill = y; } com_line_fill *= cell_size_for_common_fill_hist; /* get avg fill */ avg_line_fill = avg_line_fill / counter; /* free fill arrays */ free (line_fill); free (line_fill_hist); /* set to precent of line height */ if (!line_height) { m->avg_line_fill = 0; m->com_line_fill = 0; } else { m->avg_line_fill = 100 * avg_line_fill / line_height; m->com_line_fill = 100 * com_line_fill / line_height; } return FALSE; } int ho_dimentions_get_columns (const ho_bitmap * m) { int i, return_val; int hlink_value; ho_bitmap *m_cols = NULL; ho_bitmap *m_temp = NULL; ho_objmap *m_obj = NULL; ho_bitmap *m_clean; /* clean tresholding artefacts from image */ if (m->width > 120 && m->height > 120) { m_clean = ho_bitmap_clone_window (m, 30, 30, m->width - 60, m->height - 60); if (!m_clean) return 1; } else { /* samll image, must be one col */ return 1; } /* link columns */ m_temp = ho_bitmap_vlink (m_clean, m->height / 3); ho_bitmap_free (m_clean); if (!m_temp) return 1; /* look for resnoble hlink value */ hlink_value = ((m->width / 100) < 30) ? 30 : m->width / 100; m_cols = ho_bitmap_hlink (m_temp, hlink_value); ho_bitmap_free (m_temp); if (!m_cols) return 1; /* create an object map from b/w image */ m_obj = ho_objmap_new_from_bitmap (m_cols); ho_bitmap_free (m_cols); if (!m_obj) return 1; /* get number ot columns */ return_val = 0; for (i = 0; i < ho_objmap_get_size (m_obj); i++) if (ho_objmap_get_object (m_obj, i).width > m->width / 8) return_val++; ho_objmap_free (m_obj); return return_val; } int ho_dimentions_get_columns_with_x_start (const ho_bitmap * m, int **column_start_list) { int i, index, return_val; int x; int hlink_value; ho_bitmap *m_cols = NULL; ho_bitmap *m_temp = NULL; ho_objmap *m_obj = NULL; ho_bitmap *m_clean; /* clean tresholding artefacts from image */ if (m->width > 120 && m->height > 120) { m_clean = ho_bitmap_clone_window (m, 30, 30, m->width - 60, m->height - 60); if (!m_clean) return 1; } else { /* samll image, must be one col */ return 1; } /* link columns */ m_temp = ho_bitmap_vlink (m_clean, m->height / 2); ho_bitmap_free (m_clean); /* look for resnoble hlink value */ hlink_value = ((m->width / 100) < 30) ? 30 : m->width / 100; m_cols = ho_bitmap_hlink (m_temp, hlink_value); ho_bitmap_free (m_temp); if (!m_cols) return 1; /* clean small artefacts */ m_temp = ho_bitmap_filter_by_size (m_cols, m->height / 8, m->height, m->width / 8, m->width); ho_bitmap_free (m_cols); if (!m_temp) return 1; m_cols = m_temp; /* create an object map from b/w image */ m_obj = ho_objmap_new_from_bitmap (m_cols); ho_bitmap_free (m_cols); if (!m_obj) return 1; /* get number ot columns */ return_val = ho_objmap_get_size (m_obj); /* allocate column start list */ if (return_val > 1) { *column_start_list = calloc (return_val, sizeof (int)); /* did we get the memory ? */ if (*column_start_list) { /* init all column start to start of page */ for (i = 0; i < return_val; i++) (*column_start_list)[i] = 0; /* fill the list */ index = 0; for (x = m->width; x >= 0 && index < return_val; x--) { for (i = 0; i < return_val; i++) { if (ho_objmap_get_object (m_obj, i).x == x) { (*column_start_list)[index] = x; index++; } } } } } ho_objmap_free (m_obj); return return_val; } double ho_dimentions_get_lines_angle (const ho_bitmap * m) { int i, number_of_lines; int y_left, y_right; int width; double angle; ho_bitmap *m_lines = NULL; ho_bitmap *m_temp = NULL; ho_objmap *m_obj = NULL; /* link lines */ m_lines = ho_segment_lines (m); if (!m_lines) return 0; /* remove short lines */ m_temp = ho_bitmap_filter_by_size (m_lines, 10, m_lines->height / 2, 2 * m_lines->width / 3, m_lines->width); ho_bitmap_free (m_lines); if (!m_temp) return 0; m_lines = m_temp; /* create an object map from b/w image */ m_obj = ho_objmap_new_from_bitmap (m_lines); ho_bitmap_free (m_lines); if (!m_obj) return 0; /* get number ot lines */ number_of_lines = ho_objmap_get_size (m_obj); /* if no long lines angle is 0 */ if (number_of_lines < 1) return 0; /* get the first line */ m_temp = ho_objmap_to_bitmap_by_index_window (m_obj, 0, number_of_lines / 2); ho_objmap_free (m_obj); if (!m_temp) return 0; /* get angle */ y_left = 0; for (i = 0; i < m_temp->height; i++) { if (ho_bitmap_get (m_temp, 1 * m_temp->width / 4, i)) { y_left = i; i = m_temp->height; } } y_right = 0; for (i = 0; i < m_temp->height; i++) { if (ho_bitmap_get (m_temp, 3 * m_temp->width / 4, i)) { y_right = i; i = m_temp->height; } } ho_bitmap_free (m_temp); width = 2 * m_temp->width / 4; /* sanity check */ if ((y_left - y_right) == 0 || width < 10) return 0; /* get degree */ angle = 180.0 * atan2 ((double) (y_left - y_right), (double) width) / M_PI; return angle; } libhocr-0.10.17/src/ho_array_stat.h0000644000175000017500000000704111021241403014010 00000000000000 /*************************************************************************** * ho_array_stat.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_array_stat.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_ARRAY_STAT_H #define HO_ARRAY_STAT_H 1 #include #include #include #define ho_array_stat_set_sum(m,x,y,val) (((m)->data_sums)[(x)+(y)*(m)->width]=(val)) #define ho_array_stat_set_sqr_sum(m,x,y,val) (((m)->data_squre_sums)[(x)+(y)*(m)->width]=(val)) #define ho_array_stat_add_sum(m,x,y,val) (((m)->data_sums)[(x)+(y)*(m)->width]+=(val)) #define ho_array_stat_add_sqr_sum(m,x,y,val) (((m)->data_squre_sums)[(x)+(y)*(m)->width]+=(val)) #define ho_array_stat_get_sum(m,x,y) (((m)->data_sums)[(x)+(y)*(m)->width]) #define ho_array_stat_get_sqr_sum(m,x,y) (((m)->data_squre_sums)[(x)+(y)*(m)->width]) #define ho_array_stat_get_width(m) ((m)->width) #define ho_array_stat_get_height(m) ((m)->height) #define ho_array_stat_get_size(m) ((m)->size) #define ho_array_stat_get_threshold(m) ((m)->threshold) #define ho_array_stat_set_threshold(m,t) ((m)->threshold=(t)) #define ho_array_stat_get_data(m) ((m)->data) /** @struct ho_array_stat @brief libhocr array statistics struct */ typedef struct { /* FIXME: do we need a histogram history of a pixel ? */ int height; int width; int size; double threshold; double *data_sums; double *data_squre_sums; } ho_array_stat; /** new ho_array_stat @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @param threshold the threshold for making a mask @return newly allocated ho_array */ ho_array_stat *ho_array_stat_new (const int width, const int height, double threshold); /** free an ho_array_stat @param pix pointer to an ho_array @return FALSE */ int ho_array_stat_free (ho_array_stat * pix); /** init an ho_array_stat from an ho_array @param pix pointer to an ho_array image @return newly allocated gray ho_array */ unsigned char ho_array_stat_init (ho_array_stat * ar, const ho_array * pix); /** add an ho_array to an ho_array_stat @param pix pointer to an ho_array image @return newly allocated gray ho_array */ unsigned char ho_array_stat_add (ho_array_stat * ar, const ho_array * pix); /** new ho_array from ho_array_stat @param hist pointer to an ho_array_stat @return newly allocated ho_array */ ho_array *ho_array_stat_to_array (const ho_array_stat * ar_st); /** new ho_array mask from ho_array_stat and an ho_array @param ar_st pointer to an ho_array_stst @param ar pointer to an ho_array @return newly allocated mask ho_array */ ho_array *ho_array_stat_to_array_mask (const ho_array_stat * ar_st, const ho_array * ar); #endif /* HO_ARRAY_STAT_H */ libhocr-0.10.17/src/ho_dimentions.h0000644000175000017500000000572011017002614014016 00000000000000 /*************************************************************************** * ho_dimentions.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_dimentions.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_DIMENTIONS_H #define HO_DIMENTIONS_H 1 #include #include /** guess font dimentions, sets: font_height, font_width and nikud [for a page or block] @param m pointer to an ho_bitmap @param min_height only objects with this minimal height are used @param max_height only objects with this maximal height are used @param min_width only objects with this minimal width are used @param max_width only objects with this maximal width are used @return FALSE */ int ho_dimentions_font_width_height_nikud (ho_bitmap * m, const int min_height, const int max_height, const int min_width, const int max_width); /** guess line dimentions, sets line_spacing [for a block] @param m pointer to an ho_bitmap @return FALSE */ int ho_dimentions_line_spacing (ho_bitmap * m); /** guess line dimentions, sets font_spacing [for a line] @param m pointer to an ho_bitmap of text @param m_line_map pointer to an ho_bitmap of ine @return FALSE */ int ho_dimentions_font_spacing (ho_bitmap * m, const ho_bitmap * m_line_map); /** get line fill parameters [for a line] @param m pointer to an ho_bitmap of text @param m_line_map pointer to an ho_bitmap of ine @return FALSE */ int ho_dimentions_line_fill (ho_bitmap * m, const ho_bitmap * m_line_map); /** guess number of columns in bitmap @param m pointer to an ho_bitmap @return guessed number of columns */ int ho_dimentions_get_columns (const ho_bitmap * m); /** guess number of columns in bitmap @param m pointer to an ho_bitmap @param column_start_list a newly allocated int list of start of columns x value @return guessed number of columns */ int ho_dimentions_get_columns_with_x_start (const ho_bitmap * m, int **column_start_list); /** guess angle of page lines @param m pointer to an ho_bitmap @return guessed angle in degrees */ double ho_dimentions_get_lines_angle (const ho_bitmap * m); #endif /* HO_DIMENTIONS_H */ libhocr-0.10.17/src/ho_bitmap.h0000644000175000017500000002771311017002614013127 00000000000000 /*************************************************************************** * ho_bitmap.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_bitmap.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_BITMAP_H #define HO_BITMAP_H 1 /* hocr bitmap set/get macros */ #define ho_bitmap_get(m,x,y) (((((m)->data[(x) / 8 + (y) * (m)->rowstride]) & (0x80 >> ((x) % 8))) > 0)?1:0) #define ho_bitmap_set(m,x,y) (((m)->data[(x) / 8 + (y) * (m)->rowstride]) |= (0x80 >> ((x) % 8))) #define ho_bitmap_unset(m,x,y) (((m)->data[(x) / 8 + (y) * (m)->rowstride]) &= ~(0x80 >> ((x) % 8))) #define ho_bitmap_get_x(m) ((m)->x) #define ho_bitmap_get_y(m) ((m)->y) #define ho_bitmap_set_x(m,new_x) ((m)->x=(new_x)) #define ho_bitmap_set_y(m,new_y) ((m)->y=(new_y)) #define ho_bitmap_get_width(m) ((m)->width) #define ho_bitmap_get_height(m) ((m)->height) /** @struct ho_bitmap @brief libhocr bitmap struct */ typedef struct { unsigned char type; int font_height; int font_width; int font_spacing; int line_spacing; int avg_line_fill; int com_line_fill; unsigned char nikud; int x; int y; int height; int width; int rowstride; unsigned char *data; } ho_bitmap; /** new ho_bitamp @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_new (const int width, const int height); /** free an ho_bitmap @param m pointer to an ho_bitmap @return FALSE */ int ho_bitmap_free (ho_bitmap * m); /** copy a bitmap @param m the bitmap to copy @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_clone (const ho_bitmap * m); /** copy a window from a bitmap @param m the bitmap to copy @param x x-start of window @param y y-start of window @param width width of window @param height height of window @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_clone_window (const ho_bitmap * m, const int x, const int y, const int width, const int height); /** do bitwise and of two bitmaps @param m_left the left hand bitmap @param m_right the right hand bitmap @return FALSE */ int ho_bitmap_and (ho_bitmap * m_left, const ho_bitmap * m_right); /** do bitwise or of two bitmaps @param m_left the left hand bitmap @param m_right the right hand bitmap @return FALSE */ int ho_bitmap_or (ho_bitmap * m_left, const ho_bitmap * m_right); /** do bitwise xor of two bitmaps @param m_left the left hand bitmap @param m_right the right hand bitmap @return FALSE */ int ho_bitmap_xor (ho_bitmap * m_left, const ho_bitmap * m_right); /** do bitwise and not of two bitmaps @param m_left the left hand bitmap @param m_right the right hand bitmap @return FALSE */ int ho_bitmap_andnot (ho_bitmap * m_left, const ho_bitmap * m_right); /** do bitwise copy of two bitmaps @param m_left the left hand bitmap @param m_right the right hand bitmap @return FALSE */ int ho_bitmap_copy (ho_bitmap * m_left, const ho_bitmap * m_right); /** do bitwise not of a bitmap @param m the left hand bitmap @return a newly allocated bitmap */ ho_bitmap *ho_bitmap_not (const ho_bitmap * m); /** dilation of a a bitmap with 3x3 box @param m the bitmap to dilate @param n dilation constant @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_dilation_n (const ho_bitmap * m, const unsigned char n); /** erosion of a a bitmap with 3x3 box @param m the bitmap to erode @param n erosion constant @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_erosion_n (const ho_bitmap * m, const unsigned char n); /** take only top height black pixels of bitmap @param m the bitmap to erode @param height the height to take @param top space above black pixel included in new object @param bottom space below black pixel included in new object @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_set_height (const ho_bitmap * m, const int height, const int top, const int bottom); /** take only bottom height black pixels of bitmap @param m the bitmap to erode @param height the height to take @param top space above black pixel included in new object @param bottom space below black pixel included in new object @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_set_height_from_bottom (const ho_bitmap * m, const int height, const int top, const int bottom); /** dilation of a a bitmap with 3x3 box @param m the bitmap to dilate @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_dilation (const ho_bitmap * m); /** erosion of a a bitmap with 3x3 box @param m the bitmap to erode @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_erosion (const ho_bitmap * m); /** opening of a a bitmap with 3x3 box @param m the bitmap to open @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_opening (const ho_bitmap * m); /** closing of a a bitmap with 3x3 box @param m the bitmap to close @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_closing (const ho_bitmap * m); /** horizontaly link black dots in a bitmap @param m the bitmap to horizontaly link @param size maximum distance @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_hlink (const ho_bitmap * m, const int size); /** horizontaly erode black dots in a bitmap @param m the bitmap to horizontaly link @param size maximum distance @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_herode (const ho_bitmap * m, const int size); /** verticaly link black dots in a bitmap @param m the bitmap to verticaly link @param size maximum distance @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_vlink (const ho_bitmap * m, const int size); /** copy edges in bitmap @param m pointer to an ho_bitmap @param n width of egde @return a newly allocated bitmap */ ho_bitmap *ho_bitmap_edge (const ho_bitmap * m, const int n); /** return the ratio fill/volume value of a rectangle in the bitmap @param m pointer to an ho_bitmap @param x x of rectangel @param y y of rectangel @param width width of rectangel @param height height of rectangel @return the ratio value */ double ho_bitmap_get_fill (const ho_bitmap * m, const int x, const int y, const int width, const int height); /** horizontaly link short objects in a bitmap @param m the bitmap to horizontaly link @param size maximum distance @param max_height maximum hight of objects to link @return newly allocated ho_bitmap */ ho_bitmap *ho_bitmap_filter_hlink (ho_bitmap * m, int size, int max_height); /** copy objects from bitmap to bitmap by size @param m pointer to an ho_bitmap @param min_height only objects with this minimal height are copied @param max_height only objects with this maximal height are copied @param min_width only objects with this minimal width are copied @param max_width only objects with this maximal width are copied @return a newly allocated bitmap */ ho_bitmap *ho_bitmap_filter_by_size (const ho_bitmap * m, int min_height, int max_height, int min_width, int max_width); /** copy boxed objects from bitmap @param m pointer to an ho_bitmap @param leeway_down space below object to be included in box @param leeway_up space above object to be included in box @return a newly allocated bitmap */ ho_bitmap *ho_bitmap_filter_boxes (const ho_bitmap * m, const int leeway_down, const int leeway_up); /** copy filled objects from bitmap @param m pointer to an ho_bitmap @return a newly allocated bitmap */ ho_bitmap *ho_bitmap_filter_fill (const ho_bitmap * m); /** take height top pixels from objects in bitmap @param m pointer to an ho_bitmap @param height of new objects @param top space above black pixel included in new object @param bottom space below black pixel included in new object @return a newly allocated bitmap */ ho_bitmap *ho_bitmap_filter_set_height (const ho_bitmap * m, const int height, const int top, const int bottom); /** take height bottom pixels from objects in bitmap @param m pointer to an ho_bitmap @param height of new objects @param top space above black pixel included in new object @param bottom space below black pixel included in new object @return a newly allocated bitmap */ ho_bitmap *ho_bitmap_filter_set_height_from_bottom (const ho_bitmap * m, const int height, const int top, const int bottom); /** take extend objects lateraly @param m pointer to an ho_bitmap @param ext_width width of lateral extention @return a newly allocated bitmap */ ho_bitmap *ho_bitmap_filter_obj_extend_lateraly (const ho_bitmap * m, const int ext_width); /** remove halftone dots from bitmap @param m pointer to an ho_bitmap @param erosion_n the erosion operator factor @param dilation_n the dilation operator factor @return a newly allocated bitmap */ ho_bitmap *ho_bitmap_filter_remove_dots (const ho_bitmap * m, const unsigned char erosion_n, const unsigned char dilation_n); /** count the number of objects in a bitmap @param m pointer to an ho_bitmap @return the number of objects in a bitmap */ int ho_bitmap_filter_count_objects (const ho_bitmap * m); /** draw a black box on bitmap @param m the bitmap to draw on @param x x-start of box @param y y-start of box @param width width of box @param height height of box @return FALSE */ int ho_bitmap_draw_box (ho_bitmap * m, const int x, const int y, const int width, const int height); /** draw a black empty box on bitmap @param m the bitmap to draw on @param x x-start of box @param y y-start of box @param width width of box @param height height of box @return FALSE */ int ho_bitmap_draw_box_empty (ho_bitmap * m, const int x, const int y, const int width, const int height); /** draw vertical line on bitmap @param m the bitmap to draw on @param x x-start of line @param y y-start of line @param height height of line @return FALSE */ int ho_bitmap_draw_vline (ho_bitmap * m, const int x, const int y, const int height); /** delete vertical line on bitmap @param m the bitmap to draw on @param x x-start of line @param y y-start of line @param height height of line @return FALSE */ int ho_bitmap_delete_vline (ho_bitmap * m, const int x, const int y, const int height); /** draw horizontal line on bitmap @param m the bitmap to draw on @param x x-start of line @param y y-start of line @param width height of line @return FALSE */ int ho_bitmap_draw_hline (ho_bitmap * m, const int x, const int y, const int width); /** delete horizontal line on bitmap @param m the bitmap to draw on @param x x-start of line @param y y-start of line @param width height of line @return FALSE */ int ho_bitmap_delete_hline (ho_bitmap * m, const int x, const int y, const int width); /** rotate a bitmap @param m the bitmap to rotate @param angle the angle in deg. @return newly allocated ho_bitmap */ ho_bitmap * ho_bitmap_rotate (const ho_bitmap * m, const double angle); /** writes ho_bitmap to pnm file @param m ho_bitmap 1 bpp @param filename save as file name @return FALSE */ int ho_bitmap_pnm_save (const ho_bitmap * m, const char *filename); /** writes ho_bitmap to tiff file @param m ho_bitmap 1 bpp @param filename save as file name @return FALSE */ int ho_bitmap_tiff_save (const ho_bitmap * m, const char *filename); #endif /* HO_BITMAP_H */ libhocr-0.10.17/src/ho_bitmap_hist.h0000644000175000017500000000460111027661211014152 00000000000000 /*************************************************************************** * ho_bitmap_hist.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_bitmap_hist.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_BITMAP_HIST_H #define HO_BITMAP_HIST_H 1 /* hocr bitmap_hist set/get macros */ #define ho_bitmap_hist_get_width(m) ((m)->width) #define ho_bitmap_hist_get_height(m) ((m)->height) #define ho_bitmap_hist_get_fill(m) ((m)->fill) #define ho_bitmap_hist_get_max_x(m) ((m)->max_x) #define ho_bitmap_hist_get_max_y(m) ((m)->max_y) #define ho_bitmap_hist_get_max_x_index(m) ((m)->max_x_index) #define ho_bitmap_hist_get_max_y_index(m) ((m)->max_y_index) /** @struct ho_bitmap_hist @brief libhocr bitmap histogram struct */ typedef struct { int height; int width; int fill; int max_x; int max_y; int max_x_index; int max_y_index; unsigned int *data_x; unsigned int *data_y; } ho_bitmap_hist; /** new ho_bitamp_hist @param height hight of bitmap in pixels @param width width of bitmap in pixels @return newly allocated ho_bitmap_hist */ ho_bitmap_hist *ho_bitmap_hist_new (const int width, const int height); /** free an ho_bitmap_hist @param m pointer to an ho_bitmap_hist @return FALSE */ int ho_bitmap_hist_free (ho_bitmap_hist * m); /** update an ho_bitmap_hist from ho_bitmap data @param hist pointer to an ho_bitmap_hist @param m pointer to an ho_bitmap @return FALSE */ int ho_bitmap_hist_update(ho_bitmap_hist * hist, const ho_bitmap * m); #endif /* HO_BITMAP_HIST_H */ libhocr-0.10.17/src/ho_linguistics.h0000644000175000017500000000242311042563556014216 00000000000000 /*************************************************************************** * ho_linguistics.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_linguistics.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_LINGUISTICS_H #define HO_LINGUISTICS_H 1 int ho_linguistics_adjust_array_out (double *array_out, unsigned char word_end, unsigned char word_start, int last_char_i); #endif /* HO_LINGUISTICS_H */ libhocr-0.10.17/src/ho_objmap.h0000644000175000017500000001445211017002614013117 00000000000000 /*************************************************************************** * ho_objmap.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_objmap.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_OBJMAP_H #define HO_OBJMAP_H 1 #include /* hocr objmap set/get macros */ #define ho_objmap_set(m,x,y,val) (((m)->map)[(x) + (y) * (m)->width] = (val)) #define ho_objmap_get(m,x,y) (((m)->map)[(x) + (y) * (m)->width]) #define ho_objmap_get_size(m) ((m)->obj_list->size) #define ho_objmap_get_object(m,i) ((m)->obj_list->objects[(i)]) #define ho_objmap_get_width(m) ((m)->width) #define ho_objmap_get_height(m) ((m)->height) /** @struct ho_obj @brief libhocr object struct */ typedef struct { int index; int reading_index; double weight; int x; int y; int width; int height; } ho_obj; /** @struct ho_objlist @brief libhocr object list struct */ typedef struct { int size; int allocated_size; ho_obj *objects; } ho_objlist; /** @struct ho_objmap @brief libhocr object map struct */ typedef struct { int x; int y; int height; int width; int *map; ho_objlist *obj_list; } ho_objmap; ho_objlist *ho_objlist_new (); int ho_objlist_free (ho_objlist * object_list); int ho_objlist_add (ho_objlist * object_list, double weight, int x, int y, int width, int height); int ho_objlist_get_index (ho_objlist * object_list, int index); ho_obj *ho_objlist_get_object (ho_objlist * object_list, int index); int ho_objlist_add_pixel (ho_objlist * object_list, int index, int x, int y); int ho_objlist_link (ho_objlist * object_list, int index1, int index2); int ho_objlist_clean (ho_objlist * object_list, int **map); int ho_objlist_clean_by_reading_index (ho_objlist * object_list, int **map); int ho_objlist_print (ho_objlist * object_list); int ho_objlist_statistics (ho_objlist * object_list, int min_height, int max_height, int min_width, int max_width, int *counter, double *weight_avg, double *weight_com, double *weight_min, double *weight_max, int *height_avg, int *height_com, int *height_min, int *height_max, int *width_avg, int *width_com, int *width_min, int *width_max); /** new ho_pixbuf @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @return newly allocated ho_pixbuf */ ho_objmap *ho_objmap_new (const int width, const int height); /** free an ho_objmap @param m pointer to an ho_objmap @return FALSE */ int ho_objmap_free (ho_objmap * m); /** clean the ho_objmap index list @param m pointer to an ho_objmap @return FALSE */ int ho_objmap_clean (ho_objmap * m); /** sort the ho_objmap by reading index @param m pointer to an ho_objmap @param col numbere of columns @param dir_ltr true-ltr false-rtl @return FALSE */ int ho_objmap_sort_by_reading_index (ho_objmap * m, const unsigned char col, const unsigned char dir_ltr); /** new ho_objmap from ho_bitmap @param bit_in pointer to an ho_bitmap image @return newly allocated ho_objmap */ ho_objmap *ho_objmap_new_from_bitmap (const ho_bitmap * bit_in); /** guess font metrics @param m pointer to an ho_objmap @param min_height only objects with this minimal height are used @param max_height only objects with this maximal height are used @param min_width only objects with this minimal width are used @param max_width only objects with this maximal width are used @param height pointer to return the guessed font average height @param width pointer to return the guessed font average width @param nikud pointer to return the guessed nikud in page @return FALSE */ int ho_objmap_font_metrix (const ho_objmap * m, const int min_height, const int max_height, const int min_width, const int max_width, int *height, int *width, unsigned char *nikud); /** new ho_bitamp from objmap @param obj_in the object map to use @return newly allocated ho_bitmap */ ho_bitmap *ho_objmap_to_bitmap (const ho_objmap * obj_in); /** copy objects from objmap to bitmap by size @param m pointer to an ho_objmap @param min_height only objects with this minimal height are copied @param max_height only objects with this maximal height are copied @param min_width only objects with this minimal width are copied @param max_width only objects with this maximal width are copied @return a newly allocated bitmap */ ho_bitmap *ho_objmap_to_bitmap_by_size (const ho_objmap * m, int min_height, int max_height, int min_width, int max_width); /** copy objects from objmap to bitmap by index @param m pointer to an ho_objmap @param index the index of the object to copy @return a newly allocated bitmap size of objmap */ ho_bitmap *ho_objmap_to_bitmap_by_index (const ho_objmap * m, const int index); /** copy objects from objmap to bitmap by index of the object @param m pointer to an ho_objmap @param index the index of the object to copy @param frame size of white frame in the new bitmap @return a newly allocated bitmap size of object + frame */ ho_bitmap *ho_objmap_to_bitmap_by_index_window (const ho_objmap * m, const int index, const int frame); /** guess reading_index @param m pointer to an ho_objmap @param n_columns numbere of columns @param dir_ltr true-ltr false-rtl @return FALSE */ int ho_objmap_update_reading_index (ho_objmap * m, const unsigned char n_columns, const unsigned char dir_ltr); /** get an object by index @param m pointer to an ho_objmap @param index the object index @return the object */ ho_obj *ho_objmap_get_object_by_index (ho_objmap * m, int index); #endif /* HO_OBJMAP_H */ libhocr-0.10.17/src/ho_pixbuf.h0000644000175000017500000004020711017002614013141 00000000000000 /*************************************************************************** * ho_pixbuf.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_pixbuf.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_PIXBUF_H #define HO_PIXBUF_H 1 #include #include #include /* utility defines */ #define ho_pixbuf_min3(a,b,c) ((((a)<(b))&&((a)<(c))) ? (a) : (((b)<(c)) ? (b) : (c))) #define ho_pixbuf_max3(a,b,c) ((((a)>(b))&&((a)>(c))) ? (a) : (((b)>(c)) ? (b) : (c))) /* hocr pixbuf set/get macros */ #define ho_pixbuf_set(m,x,y,col,val) (((m)->data)[(x)*(m)->n_channels+(y)*(m)->rowstride+(col)]=(val)) #define ho_pixbuf_get(m,x,y,col) (((m)->data)[(x)*(m)->n_channels+(y)*(m)->rowstride+(col)]) #define ho_pixbuf_get_n_channels(m) ((m)->n_channels) #define ho_pixbuf_get_width(m) ((m)->width) #define ho_pixbuf_get_height(m) ((m)->height) #define ho_pixbuf_get_rowstride(m) ((m)->rowstride) #define ho_pixbuf_get_data(m) ((m)->data) /** @struct string_data @brief helper string struct for non-null-terminated strings */ typedef struct string_data { int size; char *data; } string_data; /** @struct ho_pixbuf @brief libhocr pixbuf map struct (copy gtk pixbuf) */ typedef struct { unsigned char n_channels; int height; int width; int rowstride; unsigned char *data; } ho_pixbuf; /** new ho_pixbuf @param n_channels number of color channels @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @param rowstride number of bytes in a row @return newly allocated ho_pixbuf */ ho_pixbuf *ho_pixbuf_new (const unsigned char n_channels, const int width, const int height, const int rowstride); /** clone ho_pixbuf @param m pointer to a ho_pixbuf image @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_clone (const ho_pixbuf * m); /** clone ho_pixbuf window @param m pointer to a ho_pixbuf image @param x x-start of window @param y y-start of window @param width width of window @param height height of window @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_clone_window (const ho_pixbuf * m, const int x, const int y, const int width, const int height); /** copy pixel date to a ho_pixbuf @param pix pointer to a ho_pixbuf image @param data the pixel data to copy @return newly allocated gray ho_pixbuf */ int ho_pixbuf_set_data (ho_pixbuf * pix, const char *data); /** get pixel date to a ho_pixbuf as a string @param pix pointer to a ho_pixbuf image @param a string data struct of the pixbuf data */ string_data ho_pixbuf_get_data_string (ho_pixbuf * pix); /** new ho_pixbuf from ho_bitmap @param bit_in pointer to an ho_bitmap image @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_new_from_bitmap (const ho_bitmap * bit_in); /** new ho_pixbuf from ho_objmap @param obj_in pointer to an ho_objmap image @param min minimal color value @param max maximal color value @return newly allocated color ho_pixbuf */ ho_pixbuf *ho_pixbuf_new_from_objmap (const ho_objmap * obj_in, const unsigned char min, const unsigned char max); /** new ho_pixbuf from ho_layout @param lay_in pointer to an ho_layout image @param show_grid show grid on output @param m_text text to draw on output @param text_block_r red channel of text block @param text_block_g green channel of text block @param text_block_b blue channel of text block @param text_block_a alfa channel of text block @param text_block_frame_width frame width of text block @param line_block_r red channel of line block @param line_block_g green channel of line block @param line_block_b blue channel of line block @param line_block_a alfa channel of line block @param line_block_frame_width frame line of text block @param word_block_r red channel of word block @param word_block_g green channel of word block @param word_block_b blue channel of word block @param word_block_a alfa channel of word block @param word_block_frame_width frame width of word block @param font_block_r red channel of font block @param font_block_g green channel of font block @param font_block_b blue channel of font block @param font_block_a alfa channel of font block @param font_block_frame_width frame width of font block @return newly allocated color ho_pixbuf */ ho_pixbuf *ho_pixbuf_new_from_layout (const ho_layout * lay_in, const unsigned char show_grid, const ho_bitmap * m_text, const unsigned char text_block_r, const unsigned char text_block_g, const unsigned char text_block_b, const unsigned char text_block_a, const unsigned char text_block_frame_width, const unsigned char line_block_r, const unsigned char line_block_g, const unsigned char line_block_b, const unsigned char line_block_a, const unsigned char line_block_frame_width, const unsigned char word_block_r, const unsigned char word_block_g, const unsigned char word_block_b, const unsigned char word_block_a, const unsigned char word_block_frame_width, const unsigned char font_block_r, const unsigned char font_block_g, const unsigned char font_block_b, const unsigned char font_block_a, const unsigned char font_block_frame_width); /** new rgb ho_pixbuf from non rgb pixbuf @param pix_in pointer the original pixbuf @return newly allocated rgb color ho_pixbuf */ ho_pixbuf *ho_pixbuf_to_rgb (const ho_pixbuf * pix_in); /** free an ho_pixbuf @param pix pointer to an ho_pixbuf @return FALSE */ int ho_pixbuf_free (ho_pixbuf * pix); /** converts a color pixbuf to gray one @param pix the color ho_pixbuf @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_color_to_gray (const ho_pixbuf * pix); /** take the Red channel from an RGB pixbuf @param pix the color ho_pixbuf @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_color_to_red (const ho_pixbuf * pix); /** take the Green channel from an RGB pixbuf @param pix the color ho_pixbuf @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_color_to_green (const ho_pixbuf * pix); /** take the Blue channel from an RGB pixbuf @param pix the color ho_pixbuf @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_color_to_blue (const ho_pixbuf * pix); /** scale a gray pixbuf to by 2 @param pix the input ho_pixbuf @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_scale2 (const ho_pixbuf * pix); /** scale a gray pixbuf to by 3 @param pix the input ho_pixbuf @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_scale3 (const ho_pixbuf * pix); /** scale a gray pixbuf to by 4 @param pix the input ho_pixbuf @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_scale4 (const ho_pixbuf * pix); /** scale a gray pixbuf to by 8 @param pix the input ho_pixbuf @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_scale8 (const ho_pixbuf * pix); /** scale a gray pixbuf @param pix the input ho_pixbuf @param scale scale by this factor @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_scale (const ho_pixbuf * pix, const unsigned char scale); /** get the min and max values in a gray pixbuf @param pix gray ho_pixbuf @param min a pointer to return the min @param max a pointer to return the max @return FALSE */ unsigned char ho_pixbuf_minmax (const ho_pixbuf * pix, unsigned char *min, unsigned char *max); /** aplay a linear filter to a gray pixbuf @param pix the input ho_pixbuf @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_linear_filter (const ho_pixbuf * pix); /** convert a color or gray pixbuf to bitmap @param pix the input ho_pixbuf @param threshold the threshold to use 0..100 @return newly allocated b/w ho_bitmap */ ho_bitmap *ho_pixbuf_to_bitmap (const ho_pixbuf * pix, unsigned char threshold); /** convert a color or gray pixbuf to bitmap @param pix the input ho_pixbuf @param min_red the min threshold for red channel @param max_red the max threshold for red channel @param min_green the min threshold for green channel @param max_gren the max threshold for green channel @param min_blue the min threshold for blue channel @param max_blue the max threshold for blue channel @return newly allocated b/w ho_bitmap */ ho_bitmap *ho_pixbuf_to_bitmap_by_color (const ho_pixbuf * pix, unsigned char min_red, unsigned char max_red, unsigned char min_green, unsigned char max_green, unsigned char min_blue, unsigned char max_blue); /** convert a gray pixbuf to bitmap using adaptive thresholding @param pix the input ho_pixbuf @param threshold the threshold to use 0..100 @param size block size for the adaptive steps @param adaptive_threshold the threshold to use for adaptive thresholding 0..100 @return newly allocated b/w ho_bitmap */ ho_bitmap *ho_pixbuf_to_bitmap_adaptive (const ho_pixbuf * pix, unsigned char threshold, unsigned char size, unsigned char adaptive_threshold); /** convert a gray pixbuf to bitmap using better adaptive thresholding @param pix the input ho_pixbuf @param threshold the threshold to use 0..100 @param size block size for the adaptive steps @param adaptive_threshold the threshold to use for adaptive thresholding 0..100 @return newly allocated b/w ho_bitmap */ ho_bitmap *ho_pixbuf_to_bitmap_adaptive_fine (const ho_pixbuf * pix, unsigned char threshold, unsigned char size, unsigned char adaptive_threshold); /** convert a color of gray pixbuf to bitmap wrapper function @param pix_in the input ho_pixbuf @param scale the scale to use @param adaptive what type of thresholding to use. 0-normal,1-no,2-fine. @param threshold the threshold to use 0..100 @param a_threshold the threshold to use for adaptive thresholding 0..100 @param size kernel size to use for adaptive thresholding @return newly allocated b/w ho_bitmap */ ho_bitmap * ho_pixbuf_to_bitmap_wrapper (const ho_pixbuf * pix_in, const unsigned char scale, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, const unsigned char size); /** draw a line from x1,y1 to x2,y2 @param m a ho_pixbuf @param x1 x cordinate of start point @param y1 y cordinate of start point @param x2 x cordinate of end point @param y2 y cordinate of end point @param red value of red channel @param green value of green channel @param blue value of blue channel @return FALSE */ int ho_pixbuf_draw_line (ho_pixbuf * m, const int x1, const int y1, const int x2, const int y2, const unsigned char red, const unsigned char green, const unsigned char blue); /** draw a box on pixbuf @param m the pixbuf to draw on @param x x-start of box @param y y-start of box @param width width of box @param height height of box @param red value of red channel @param green value of green channel @param blue value of blue channel @param alpha value of alpha channel @return FALSE */ int ho_pixbuf_draw_box (ho_pixbuf * m, const int x, const int y, const int width, const int height, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha); /** draw an empty box on pixbuf @param m the pixbuf to draw on @param x x-start of box @param y y-start of box @param width width of box @param height height of box @param red value of red channel @param green value of green channel @param blue value of blue channel @return FALSE */ int ho_pixbuf_draw_box_empty (ho_pixbuf * m, const int x, const int y, const int width, const int height, const unsigned char red, const unsigned char green, const unsigned char blue); /** draw a scale line from x1,y1 @param m a ho_pixbuf @param x1 x cordinate of start point @param y1 y cordinate of start point @param length length of scale line @param step size of scale marks @param red value of red channel @param green value of green channel @param blue value of blue channel @return FALSE */ int ho_pixbuf_draw_horizontal_scale (ho_pixbuf * m, const int x1, const int y1, const int length, const int step, const unsigned char red, const unsigned char green, const unsigned char blue); /** draw a scale line from x1,y1 @param m a ho_pixbuf @param x1 x cordinate of start point @param y1 y cordinate of start point @param length length of scale line @param step size of scale marks @param red value of red channel @param green value of green channel @param blue value of blue channel @return FALSE */ int ho_pixbuf_draw_vertical_scale (ho_pixbuf * m, const int x1, const int y1, const int length, const int step, const unsigned char red, const unsigned char green, const unsigned char blue); /** draw a grid @param m a ho_pixbuf @param size size of grid boxes @param step size of scale marks @param red value of red channel @param green value of green channel @param blue value of blue channel @return FALSE */ int ho_pixbuf_draw_grid (ho_pixbuf * m, const int size, const int step, const unsigned char red, const unsigned char green, const unsigned char blue); /** draw a bitmap @param m a ho_pixbuf @param bit_in the bitmap to draw on the pixbuf @param red value of red channel @param green value of green channel @param blue value of blue channel @param alpha value of alpha channel @return FALSE */ int ho_pixbuf_draw_bitmap (ho_pixbuf * m, const ho_bitmap * bit_in, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha); /** draw RGB bitmap @param m a ho_pixbuf @param bit_in_red the bitmap to draw on the pixbuf red channel @param bit_in_green the bitmap to draw on the pixbuf green channel @param bit_in_blue the bitmap to draw on the pixbuf blue channel @return FALSE */ int ho_pixbuf_draw_rgb_bitmap (ho_pixbuf * m, const ho_bitmap * bit_in_red, const ho_bitmap * bit_in_green, const ho_bitmap * bit_in_blue); /** draw RGB pixbufs @param m a ho_pixbuf @param bit_in_red the grey pixbuf to draw on the pixbuf red channel @param bit_in_green the grey pixbuf to draw on the pixbuf green channel @param bit_in_blue the grey pixbuf to draw on the pixbuf blue channel @return FALSE */ int ho_pixbuf_draw_rgb_pixbufs (ho_pixbuf * m, const ho_pixbuf * bit_in_red, const ho_pixbuf * bit_in_green, const ho_pixbuf * bit_in_blue); /** draw a bitmap @param m a ho_pixbuf @param bit_in the bitmap to draw on the pixbuf @param x1 x of upper right start of drawing @param y1 y of upper right start of drawing @param red value of red channel @param green value of green channel @param blue value of blue channel @param alpha value of alpha channel @return FALSE */ int ho_pixbuf_draw_bitmap_at (ho_pixbuf * m, const ho_bitmap * bit_in, const int x1, const int y1, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha); /** read ho_pixbuf from pnm file 8 or 24 bpp @param filename file name of pnm file @return newly allocated ho_pixbuf */ ho_pixbuf *ho_pixbuf_pnm_load (const char *filename); /** writes ho_pixbuf to pnm file @param pix ho_pixbuf 8 or 24 bpp @param filename save as file name @return FALSE */ int ho_pixbuf_pnm_save (const ho_pixbuf * pix, const char *filename); /** read ho_pixbuf from a b/w tiff file @param filename file name of tiff file @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_pixbuf_bw_tiff_load (const char *filename); /** writes ho_pixbuf to a black and white tiff file @param pix ho_pixbuf 8 or 24 bpp @param filename save as file name @return FALSE */ int ho_pixbuf_bw_tiff_save (const ho_pixbuf * pix, const char *filename); #endif /* HO_PIXBUF_H */ libhocr-0.10.17/src/Makefile.am0000644000175000017500000000416611042552517013057 00000000000000## Makefile.am -- Process this file with automake to produce Makefile.in # The libhocr library INCLUDES = \ $(hspell_CFLAGS) \ $(tiff_CFLAGS) \ $(fftw_CFLAGS) \ -DBUILD=\"$(BUILD_STR)\" \ -DVERSION=\"$(VERSION)\" lib_LTLIBRARIES = libhocr.la libhocr_la_SOURCES = \ hocr.c \ ho_pixbuf.c \ ho_array.c \ ho_array_hist.c \ ho_array_stat.c \ ho_bitmap.c \ ho_bitmap_hist.c \ ho_objmap.c \ ho_dimentions.c \ ho_segment.c \ ho_font.c \ ho_recognize.c \ ho_recognize_nikud.c \ fonts/ho_recognize_font_1.c \ fonts/ho_recognize_font_2.c \ fonts/ho_recognize_font_3.c \ fonts/ho_recognize_font_4.c \ fonts/ho_recognize_font_5.c \ fonts/ho_recognize_font_6.c \ ho_string.c \ ho_linguistics.c \ ho_layout.c libhocr_la_LDFLAGS = -version-info 0:0:0 libhocr_la_LIBADD = \ $(hspell_LIBS) \ $(tiff_LIBS) \ $(fftw_LIBS) library_includedir = $(includedir)/libhocr library_include_HEADERS = \ hocr.h \ hocrpp.h \ ho_pixbuf.h \ ho_array.h \ ho_array_hist.h \ ho_array_stat.h \ ho_bitmap.h \ ho_bitmap_hist.h \ ho_objmap.h \ ho_dimentions.h \ ho_segment.h \ ho_font.h \ ho_recognize.h \ ho_recognize_nikud.h \ fonts/ho_recognize_font_1.h \ fonts/ho_recognize_font_2.h \ fonts/ho_recognize_font_3.h \ fonts/ho_recognize_font_4.h \ fonts/ho_recognize_font_5.h \ fonts/ho_recognize_font_6.h \ ho_layout.h \ ho_string.h \ ho_linguistics.h \ ho_gtk.h # libhocrgtk, helper functions to use hocr in gtk programs if WITH_GTK lib_LTLIBRARIES += libhocrgtk.la libhocrgtk_la_SOURCES = \ ho_gtk.c libhocrgtk_la_CFLAGS = \ $(gtk_CFLAGS) libhocrgtk_la_LIBADD = \ $(gtk_LIBS) \ $(libhocr_la_LIBADD) \ -L. -lhocr libhocrgtk_la_LDFLAGS = $(libhocr_la_LDFLAGS) endif libhocr-0.10.17/src/ho_segment.h0000644000175000017500000001141111044116713013307 00000000000000 /*************************************************************************** * ho_segment.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_segment.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_SEGMENT_H #define HO_SEGMENT_H 1 #include #include /** return a bitmap of the paragraphs, font and line dimentions _must_ be set @param m pointer to an ho_bitmap @param box squre (boxes) or free formed text blocks @param font_height_factor_min filter objects height min @param font_height_factor_max filter objects height max @param font_width_factor_min filter objects width min @param font_width_factor_max filter objects width max @param horizontal_link_factor link horizontaly factor @param vertical_link_factor link verticaly factor @return a newly allocated bitmap */ ho_bitmap *ho_segment_paragraphs_fine (const ho_bitmap * m, const unsigned char box, const double font_height_factor_min, const double font_height_factor_max, const double font_width_factor_min, const double font_width_factor_max, const double horizontal_link_factor, const double vertical_link_factor); /** return a bitmap of the paragraphs, font and line dimentions _must_ be set @param m pointer to an ho_bitmap @param box squre (boxes) or free formed text blocks @return a newly allocated bitmap */ ho_bitmap *ho_segment_paragraphs (const ho_bitmap * m, const unsigned char box); /** return a bitmap of the lines @param m pointer to an ho_bitmap @param font_height_factor_min filter objects height min @param font_height_factor_max filter objects height max @param font_width_factor_min filter objects width min @param font_width_factor_max filter objects width max @param link_arg factor for linking letters in line @param link_arg_2 factor for linking letters in line @param extend_arg factor for extemding lines horizontaly @param extend_arg_2 factor for extemding lines horizontaly @param erode_arg factor for eroding line sourface @return a newly allocated bitmap */ ho_bitmap *ho_segment_lines_fine (const ho_bitmap * m, const double font_height_factor_min, const double font_height_factor_max, const double font_width_factor_min, const double font_width_factor_max, const double link_arg, const double link_arg_2, const double extend_arg, const double extend_arg_2, const double erode_arg); /** return a bitmap of the lines @param m pointer to an ho_bitmap @return a newly allocated bitmap */ ho_bitmap *ho_segment_lines (const ho_bitmap * m); /** return a bitmap of the words @param m pointer to an ho_bitmap of line @param m_line_map pointer to an ho_bitmap of line box @param horizontal_link_factor horizontal link factor @param top_frame_factor top frame factor @param bottom_frame_factor bottom frame factor @return a newly allocated bitmap */ ho_bitmap *ho_segment_words_fine (const ho_bitmap * m, const ho_bitmap * m_line_map, const double horizontal_link_factor, const double top_frame_factor, const double bottom_frame_factor); /** return a bitmap of the words @param m pointer to an ho_bitmap of text @param m_line_map pointer to an ho_bitmap of line @param font_spacing_code -1:tight 0:normal 1:spaced fonts @return a newly allocated bitmap */ ho_bitmap *ho_segment_words (const ho_bitmap * m, const ho_bitmap * m_line_map, const char font_spacing_code); /** return a bitmap of the interfont spaces @param m pointer to an ho_bitmap of text @param m_line_map pointer to an ho_bitmap of line @param slicing_threshold percent of line fill declared space between fonts @param slicing_width percent of font width above try to choop font in two @param line_leeway percent of line height to use above and below line @return a newly allocated bitmap */ ho_bitmap *ho_segment_fonts (const ho_bitmap * m, const ho_bitmap * m_line_map, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway); #endif /* HO_SEGMENT_H */ libhocr-0.10.17/src/ho_array.h0000644000175000017500000003052711021531226012767 00000000000000 /*************************************************************************** * ho_array.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_array.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_ARRAY_H #define HO_ARRAY_H 1 #include #include /* hocr array set/get macros */ #define ho_array_set(m,x,y,val) (((m)->data)[(x)+(y)*(m)->width]=(val)) #define ho_array_get(m,x,y) (((m)->data)[(x)+(y)*(m)->width]) #define ho_array_get_width(m) ((m)->width) #define ho_array_get_height(m) ((m)->height) #define ho_array_get_data(m) ((m)->data) /** @struct ho_array @brief libhocr array struct */ typedef struct { int height; int width; double *data; } ho_array; /** new ho_array @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @return newly allocated ho_array */ ho_array *ho_array_new (const int width, const int height); /** clone ho_array @param m pointer to a ho_array image @return newly allocated gray ho_array */ ho_array *ho_array_clone (const ho_array * m); /** copy pixel data to a ho_array @param pix pointer to a ho_array image @param data the pixel data to copy @return false */ int ho_array_set_data (ho_array * pix, double data); /** copy pixel data to a ho_array @param pix pointer to a ho_array image @param data the pixel data to copy @param x the pixel x @param y the pixel y @return false */ int ho_array_set_at (ho_array * pix, int x, int y, double data); /** get pixel data from a ho_array @param pix pointer to a ho_array image @param x the pixel x @param y the pixel y @return false */ double ho_array_get_at (ho_array * pix, int x, int y); /** new ho_array from ho_pixbuf @param pix pointer to an ho_pixbuf image @return newly allocated ho_array */ ho_array *ho_array_new_from_pixbuf (const ho_pixbuf * pix); /** new ho_array from ho_bitmap @param pix pointer to an ho_bitmap image @return newly allocated ho_array */ ho_array *ho_array_new_from_bitmap (const ho_bitmap * pix); /** new gray ho_pixbuf from ho_array @param pix_in pointer the original array @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_array_to_pixbuf (const ho_array * pix_in); /** new rgb ho_pixbuf from ho_array @param pix_in pointer the original array @return newly allocated gray ho_pixbuf */ ho_pixbuf *ho_array_to_rgb_pixbuf (const ho_array * pix_in); /** free an ho_array @param pix pointer to an ho_array @return FALSE */ int ho_array_free (ho_array * pix); /** get the min and max values in a array @param pix ho_array @param min a pointer to return the min @param max a pointer to return the max @return FALSE */ unsigned char ho_array_minmax (const ho_array * pix, double *min, double *max); /** get the mean value in a array @param pix ho_array @return min value */ double ho_array_get_mean (const ho_array * pix); /** get the min value in a array @param pix ho_array @return min value */ double ho_array_get_min (const ho_array * pix); /** get the max value in a array @param pix ho_array @return max value */ double ho_array_get_max (const ho_array * pix); /** add two ho arrays @param ar1 left side ho_array @param ar2 right side ho_array @return FALSE */ unsigned char ho_array_add (ho_array * ar1, const ho_array * ar2); /** add const to ho arrays @param ar left side ho_array @param num a number to add to array @return FALSE */ unsigned char ho_array_add_const (ho_array * ar, const double num); /** subtruct two ho arrays @param ar1 left side ho_array @param ar2 right side ho_array @return FALSE */ unsigned char ho_array_sub (ho_array * ar1, const ho_array * ar2); /** multiply two ho arrays @param ar1 left side ho_array @param ar2 right side ho_array @return FALSE */ unsigned char ho_array_mul (ho_array * ar1, const ho_array * ar2); /** multiply two ho real and imagenary ho_arrays pairs @param ar1_r left side ho_array real part @param ar1_i left side ho_array imagenaryl part @param ar2_r right side ho_array real part @param ar2_i right side ho_array imagenary part @return FALSE */ unsigned char ho_array_complex_mul (ho_array * ar1_r, ho_array * ar1_i, const ho_array * ar2_r, const ho_array * ar2_i); /** multiply const to ho arrays @param ar left side ho_array @param num a number to multiply to array @return FALSE */ unsigned char ho_array_mul_const (ho_array * ar, const double num); /** divide two ho arrays @param ar1 left side ho_array @param ar2 right side ho_array @return FALSE */ unsigned char ho_array_div (ho_array * ar1, const ho_array * ar2); /** inverse ho array @param ar ho_array @return FALSE */ unsigned char ho_array_inv (ho_array * ar); /** polerize ho array @param ar ho_array @return FALSE */ unsigned char ho_array_polerize (ho_array * ar, const double treshold); /** do log (ho array + 1) @param ar ho_array @return FALSE */ unsigned char ho_array_log (ho_array * ar); /** streach 0..1 @param ar ho_array @return FALSE */ unsigned char ho_array_streach (ho_array * ar); /** histogram equalization 0..1 @param ar ho_array @return FALSE */ unsigned char ho_array_equl (ho_array * ar); /** convolution @param ar the ho_array to us for the convolution @param kernel a 3x3 kernel ho_array @return newly allocated ho array */ ho_array *ho_array_convolution_filter (const ho_array * ar, const ho_array * kernel); /** median @param ar the ho_array to us for median filter @return newly allocated ho array */ ho_array *ho_array_median_filter (const ho_array * ar); /** max filter @param ar the ho_array to us for max filter @return newly allocated ho array */ ho_array *ho_array_max_filter (const ho_array * ar); /** min filter @param ar the ho_array to us for max filter @return newly allocated ho array */ ho_array *ho_array_min_filter (const ho_array * ar); /** absulute value @param ar_r real part ho_array @param ar_i imagenary part ho_array @return newly allocated ho array */ ho_array *ho_array_complex_abs (const ho_array * ar_r, const ho_array * ar_i); /** atan2 @param ar_r real part ho_array @param ar_i imagenary part ho_array @return newly allocated ho array */ ho_array *ho_array_complex_atan2 (const ho_array * ar_r, const ho_array * ar_i); /** gradient @param ar the ho_array to us for gradient detection @param ar_r return the r value of the gradient @param ar_theta return the theta value of the gradient @return FALSE */ unsigned char ho_array_gradient (const ho_array * ar, ho_array * ar_r, ho_array * ar_theta); /** hough trasform for circles @param ar the ho_array to us for gradient detection @param min_radius the circles min radius @param max_radius the circles max radius @param threshold the min value to use in the gradient matrix percent @return the transformed matrix */ ho_array *ho_array_hough_circles (const ho_array * ar, const int min_radius, const int max_radius, const unsigned char threshold); /** hough trasform for lines @param ar the ho_array to use for gradient detection @param threshold the min value to use in the gradient matrix percent @return the transformed matrix */ ho_array *ho_array_hough_lines (const ho_array * ar, const unsigned char threshold); /** backwords hough trasform for lines @param ar the ho_array to use for backword hough @param width the array height @param height the array height @return the backword transformed matrix */ ho_array *ho_array_hough_lines_backwords (const ho_array * ar, const int width, const int height, const unsigned char threshold); /** backwords hough trasform for lines by angle @param ar the ho_array to use for backword hough @param width the array height @param height the array height @param angle1 start line angle @param angle2 end line angle @return FALSE */ ho_array *ho_array_hough_lines_backwords_by_angle (const ho_array * ar, const int width, const int height, const int angle1, const int angle2); /** backwords hough trasform for lines by vertical angle @param ar the ho_array to use for backword hough @param width the array height @param height the array height @param angle1 start line angle @param angle2 end line angle @return FALSE */ ho_array *ho_array_hough_lines_backwords_by_angle_v (const ho_array * ar, const int width, const int height, const int angle1, const int angle2); /** fft_forword @param ar the ho_array to us for fft @param ar_re the output real values @param ar_im the output imaginary values @return FALSE */ unsigned char ho_array_fft_forword (const ho_array * ar, ho_array * ar_r, ho_array * ar_im); /** fft_backword @param ar_re input array of the real values @param ar_im input array of the imaginary values @param ar the output ho_array @return FALSE */ unsigned char ho_array_fft_backword (const ho_array * ar_r, const ho_array * ar_im, ho_array * ar); /** fft_shift @param ar_re input array of the real values @param ar_im input array of the imaginary values @param shift_ar_re output array of the real values @param shift_ar_im output array of the imaginary values @return FALSE */ unsigned char ho_array_fft_shift (const ho_array * ar_r, const ho_array * ar_im, ho_array * shift_ar_r, ho_array * shift_ar_im); /** fft_filter - applay a filter in w space @param ar input array @param ar_filter input array of the filter @return FALSE */ unsigned char ho_array_fft_filter (ho_array * ar, const ho_array * ar_filter); /** fft_filter - applay a box filter in w space @param ar input array @param box_height height of box @param box_width width of box @return FALSE */ unsigned char ho_array_fft_filter_box (ho_array * ar, const int box_width, const int box_height); /** fft_filter - applay a circle filter in w space @param ar input array @param radius radius of circle @return FALSE */ unsigned char ho_array_fft_filter_circle (ho_array * ar, const int radius); /** fft_filter - applay a gaussien filter in w space @param ar input array @param sigma of gaussien @return FALSE */ unsigned char ho_array_fft_filter_gaussien (ho_array * ar, const double sigma); /** writes ho_array to pnm file @param ar ho_array to save as gray image @param filename save as file name @return FALSE */ int ho_array_pnm_save (const ho_array * ar, const char *filename); /** load ho_array from pnm file @param filename save as file name @return new ho_array */ const ho_array *ho_array_pnm_load (const char *filename); /** writes ho_array to tiff file @param ar ho_array to save as gray image @param filename save as file name @return FALSE */ int ho_array_tiff_save (const ho_array * ar, const char *filename); /** load ho_array from tiff file @param filename save as file name @return new ho_array */ const ho_array *ho_array_tiff_load (const char *filename); /** new ho_array init to gaussian @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @param sigma the sigma to use in the gaussien @return newly allocated ho_array */ ho_array *ho_array_new_gaussien (const int width, const int height, const double sigma); /** new ho_array init to box @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @param box_height height of box @param box_width width of box @return newly allocated ho_array */ ho_array *ho_array_new_box (const int width, const int height, const int box_width, const int box_height); /** new ho_array init to circle @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @param radius radius of circle @return newly allocated ho_array */ ho_array *ho_array_new_circle (const int width, const int height, const int radius); #endif /* HO_ARRAY_H */ libhocr-0.10.17/src/ho_gtk.c0000644000175000017500000001033011033632744012431 00000000000000 /*************************************************************************** * ho_gtk.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "ho_gtk.h" ho_pixbuf * ho_gtk_pixbuf_from_gdk (const GdkPixbuf * gdk_pix) { ho_pixbuf *pix = NULL; if (!gdk_pix) { return NULL; } /* create hocr pixbuf from gkd pixbuf */ pix = ho_pixbuf_new (gdk_pixbuf_get_n_channels (gdk_pix), gdk_pixbuf_get_width (gdk_pix), gdk_pixbuf_get_height (gdk_pix), gdk_pixbuf_get_rowstride (gdk_pix)); if (!pix) return NULL; /* copy the pixels */ memcpy (pix->data, gdk_pixbuf_get_pixels (gdk_pix), (pix->height * pix->rowstride)); return pix; } ho_pixbuf * ho_gtk_pixbuf_from_gdk_share_data (const GdkPixbuf * gdk_pix) { ho_pixbuf *pix = NULL; if (!gdk_pix) { return NULL; } /* create hocr pixbuf from gkd pixbuf */ pix = ho_pixbuf_new (gdk_pixbuf_get_n_channels (gdk_pix), gdk_pixbuf_get_width (gdk_pix), gdk_pixbuf_get_height (gdk_pix), gdk_pixbuf_get_rowstride (gdk_pix)); if (!pix) return NULL; /* free ho_pixbuf data */ if (pix->data) free (pix->data); /* share the pixels */ pix->data = gdk_pixbuf_get_pixels (gdk_pix); return pix; } void ho_gdk_free_pixels (guchar * pixels, gpointer data) { free (pixels); } GdkPixbuf * ho_gtk_pixbuf_to_gdk (const ho_pixbuf * hocr_pix) { GdkPixbuf *pix = NULL; ho_pixbuf *pix_color = NULL; unsigned char *data; /* gdk has only RGB pixbufs */ pix_color = ho_pixbuf_to_rgb (hocr_pix); if (!pix_color) return NULL; /* create data */ data = malloc (pix_color->height * pix_color->rowstride); if (!data) { ho_pixbuf_free (pix_color); return NULL; } memcpy (data, pix_color->data, pix_color->height * pix_color->rowstride); /* load gdk pixbuf from ho_pixbuf */ pix = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, FALSE, 8, ho_pixbuf_get_width (pix_color), ho_pixbuf_get_height (pix_color), ho_pixbuf_get_rowstride (pix_color), ho_gdk_free_pixels, NULL); ho_pixbuf_free (pix_color); return pix; } ho_pixbuf * ho_gtk_pixbuf_load (const char *filename) { ho_pixbuf *pix = NULL; GdkPixbuf *gdk_pix = NULL; /* load gdk pixbuf from file */ gdk_pix = gdk_pixbuf_new_from_file (filename, NULL); if (!gdk_pix) { return NULL; } /* create hocr pixbuf from gkd pixbuf */ pix = ho_gtk_pixbuf_from_gdk (gdk_pix); /* free gdk pixbuf */ g_object_unref (gdk_pix); return pix; } int ho_gtk_pixbuf_save (const ho_pixbuf * pix, const char *filename, const char *ext) { GError *error = NULL; GdkPixbuf *gdk_pix = NULL; /* load gdk pixbuf from ho_pixbuf */ gdk_pix = ho_gtk_pixbuf_to_gdk (pix); if (!gdk_pix) return TRUE; /* save gdk pixbuf */ gdk_pixbuf_save (gdk_pix, filename, ext, &error, NULL); /* free memory */ g_object_unref (gdk_pix); if (error) { g_error_free (error); return TRUE; } return FALSE; } int ho_gtk_font_save (const ho_bitmap * m_text, const ho_bitmap * m_nikud, const ho_bitmap * m_mask, const char *filename, const char *ext) { int return_value; ho_pixbuf *p_out; p_out = ho_pixbuf_new (3, m_text->width, m_text->height, 0); ho_pixbuf_draw_rgb_bitmap (p_out, m_text, m_nikud, m_mask); return_value = ho_gtk_pixbuf_save (p_out, filename, ext); ho_pixbuf_free (p_out); return return_value; } libhocr-0.10.17/src/Makefile.in0000644000175000017500000007023711043604650013067 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # libhocrgtk, helper functions to use hocr in gtk programs @WITH_GTK_TRUE@am__append_1 = libhocrgtk.la subdir = src DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libhocr_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libhocr_la_OBJECTS = hocr.lo ho_pixbuf.lo ho_array.lo \ ho_array_hist.lo ho_array_stat.lo ho_bitmap.lo \ ho_bitmap_hist.lo ho_objmap.lo ho_dimentions.lo ho_segment.lo \ ho_font.lo ho_recognize.lo ho_recognize_nikud.lo \ ho_recognize_font_1.lo ho_recognize_font_2.lo \ ho_recognize_font_3.lo ho_recognize_font_4.lo \ ho_recognize_font_5.lo ho_recognize_font_6.lo ho_string.lo \ ho_linguistics.lo ho_layout.lo libhocr_la_OBJECTS = $(am_libhocr_la_OBJECTS) libhocr_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libhocr_la_LDFLAGS) $(LDFLAGS) -o $@ am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) @WITH_GTK_TRUE@libhocrgtk_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @WITH_GTK_TRUE@ $(am__DEPENDENCIES_2) am__libhocrgtk_la_SOURCES_DIST = ho_gtk.c @WITH_GTK_TRUE@am_libhocrgtk_la_OBJECTS = libhocrgtk_la-ho_gtk.lo libhocrgtk_la_OBJECTS = $(am_libhocrgtk_la_OBJECTS) libhocrgtk_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libhocrgtk_la_CFLAGS) \ $(CFLAGS) $(libhocrgtk_la_LDFLAGS) $(LDFLAGS) -o $@ @WITH_GTK_TRUE@am_libhocrgtk_la_rpath = -rpath $(libdir) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libhocr_la_SOURCES) $(libhocrgtk_la_SOURCES) DIST_SOURCES = $(libhocr_la_SOURCES) $(am__libhocrgtk_la_SOURCES_DIST) library_includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The libhocr library INCLUDES = \ $(hspell_CFLAGS) \ $(tiff_CFLAGS) \ $(fftw_CFLAGS) \ -DBUILD=\"$(BUILD_STR)\" \ -DVERSION=\"$(VERSION)\" lib_LTLIBRARIES = libhocr.la $(am__append_1) libhocr_la_SOURCES = \ hocr.c \ ho_pixbuf.c \ ho_array.c \ ho_array_hist.c \ ho_array_stat.c \ ho_bitmap.c \ ho_bitmap_hist.c \ ho_objmap.c \ ho_dimentions.c \ ho_segment.c \ ho_font.c \ ho_recognize.c \ ho_recognize_nikud.c \ fonts/ho_recognize_font_1.c \ fonts/ho_recognize_font_2.c \ fonts/ho_recognize_font_3.c \ fonts/ho_recognize_font_4.c \ fonts/ho_recognize_font_5.c \ fonts/ho_recognize_font_6.c \ ho_string.c \ ho_linguistics.c \ ho_layout.c libhocr_la_LDFLAGS = -version-info 0:0:0 libhocr_la_LIBADD = \ $(hspell_LIBS) \ $(tiff_LIBS) \ $(fftw_LIBS) library_includedir = $(includedir)/libhocr library_include_HEADERS = \ hocr.h \ hocrpp.h \ ho_pixbuf.h \ ho_array.h \ ho_array_hist.h \ ho_array_stat.h \ ho_bitmap.h \ ho_bitmap_hist.h \ ho_objmap.h \ ho_dimentions.h \ ho_segment.h \ ho_font.h \ ho_recognize.h \ ho_recognize_nikud.h \ fonts/ho_recognize_font_1.h \ fonts/ho_recognize_font_2.h \ fonts/ho_recognize_font_3.h \ fonts/ho_recognize_font_4.h \ fonts/ho_recognize_font_5.h \ fonts/ho_recognize_font_6.h \ ho_layout.h \ ho_string.h \ ho_linguistics.h \ ho_gtk.h @WITH_GTK_TRUE@libhocrgtk_la_SOURCES = \ @WITH_GTK_TRUE@ ho_gtk.c @WITH_GTK_TRUE@libhocrgtk_la_CFLAGS = \ @WITH_GTK_TRUE@ $(gtk_CFLAGS) @WITH_GTK_TRUE@libhocrgtk_la_LIBADD = \ @WITH_GTK_TRUE@ $(gtk_LIBS) \ @WITH_GTK_TRUE@ $(libhocr_la_LIBADD) \ @WITH_GTK_TRUE@ -L. -lhocr @WITH_GTK_TRUE@libhocrgtk_la_LDFLAGS = $(libhocr_la_LDFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libhocr.la: $(libhocr_la_OBJECTS) $(libhocr_la_DEPENDENCIES) $(libhocr_la_LINK) -rpath $(libdir) $(libhocr_la_OBJECTS) $(libhocr_la_LIBADD) $(LIBS) libhocrgtk.la: $(libhocrgtk_la_OBJECTS) $(libhocrgtk_la_DEPENDENCIES) $(libhocrgtk_la_LINK) $(am_libhocrgtk_la_rpath) $(libhocrgtk_la_OBJECTS) $(libhocrgtk_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_array_hist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_array_stat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_bitmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_bitmap_hist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_dimentions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_font.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_layout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_linguistics.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_objmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_pixbuf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_recognize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_recognize_font_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_recognize_font_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_recognize_font_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_recognize_font_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_recognize_font_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_recognize_font_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_recognize_nikud.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_segment.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ho_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hocr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhocrgtk_la-ho_gtk.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< ho_recognize_font_1.lo: fonts/ho_recognize_font_1.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ho_recognize_font_1.lo -MD -MP -MF $(DEPDIR)/ho_recognize_font_1.Tpo -c -o ho_recognize_font_1.lo `test -f 'fonts/ho_recognize_font_1.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_1.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ho_recognize_font_1.Tpo $(DEPDIR)/ho_recognize_font_1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fonts/ho_recognize_font_1.c' object='ho_recognize_font_1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ho_recognize_font_1.lo `test -f 'fonts/ho_recognize_font_1.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_1.c ho_recognize_font_2.lo: fonts/ho_recognize_font_2.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ho_recognize_font_2.lo -MD -MP -MF $(DEPDIR)/ho_recognize_font_2.Tpo -c -o ho_recognize_font_2.lo `test -f 'fonts/ho_recognize_font_2.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_2.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ho_recognize_font_2.Tpo $(DEPDIR)/ho_recognize_font_2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fonts/ho_recognize_font_2.c' object='ho_recognize_font_2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ho_recognize_font_2.lo `test -f 'fonts/ho_recognize_font_2.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_2.c ho_recognize_font_3.lo: fonts/ho_recognize_font_3.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ho_recognize_font_3.lo -MD -MP -MF $(DEPDIR)/ho_recognize_font_3.Tpo -c -o ho_recognize_font_3.lo `test -f 'fonts/ho_recognize_font_3.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_3.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ho_recognize_font_3.Tpo $(DEPDIR)/ho_recognize_font_3.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fonts/ho_recognize_font_3.c' object='ho_recognize_font_3.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ho_recognize_font_3.lo `test -f 'fonts/ho_recognize_font_3.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_3.c ho_recognize_font_4.lo: fonts/ho_recognize_font_4.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ho_recognize_font_4.lo -MD -MP -MF $(DEPDIR)/ho_recognize_font_4.Tpo -c -o ho_recognize_font_4.lo `test -f 'fonts/ho_recognize_font_4.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_4.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ho_recognize_font_4.Tpo $(DEPDIR)/ho_recognize_font_4.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fonts/ho_recognize_font_4.c' object='ho_recognize_font_4.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ho_recognize_font_4.lo `test -f 'fonts/ho_recognize_font_4.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_4.c ho_recognize_font_5.lo: fonts/ho_recognize_font_5.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ho_recognize_font_5.lo -MD -MP -MF $(DEPDIR)/ho_recognize_font_5.Tpo -c -o ho_recognize_font_5.lo `test -f 'fonts/ho_recognize_font_5.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_5.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ho_recognize_font_5.Tpo $(DEPDIR)/ho_recognize_font_5.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fonts/ho_recognize_font_5.c' object='ho_recognize_font_5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ho_recognize_font_5.lo `test -f 'fonts/ho_recognize_font_5.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_5.c ho_recognize_font_6.lo: fonts/ho_recognize_font_6.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ho_recognize_font_6.lo -MD -MP -MF $(DEPDIR)/ho_recognize_font_6.Tpo -c -o ho_recognize_font_6.lo `test -f 'fonts/ho_recognize_font_6.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_6.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ho_recognize_font_6.Tpo $(DEPDIR)/ho_recognize_font_6.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fonts/ho_recognize_font_6.c' object='ho_recognize_font_6.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ho_recognize_font_6.lo `test -f 'fonts/ho_recognize_font_6.c' || echo '$(srcdir)/'`fonts/ho_recognize_font_6.c libhocrgtk_la-ho_gtk.lo: ho_gtk.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhocrgtk_la_CFLAGS) $(CFLAGS) -MT libhocrgtk_la-ho_gtk.lo -MD -MP -MF $(DEPDIR)/libhocrgtk_la-ho_gtk.Tpo -c -o libhocrgtk_la-ho_gtk.lo `test -f 'ho_gtk.c' || echo '$(srcdir)/'`ho_gtk.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libhocrgtk_la-ho_gtk.Tpo $(DEPDIR)/libhocrgtk_la-ho_gtk.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ho_gtk.c' object='libhocrgtk_la-ho_gtk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhocrgtk_la_CFLAGS) $(CFLAGS) -c -o libhocrgtk_la-ho_gtk.lo `test -f 'ho_gtk.c' || echo '$(srcdir)/'`ho_gtk.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(library_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(library_includedir)/$$f'"; \ $(library_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(library_includedir)/$$f"; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(library_includedir)/$$f'"; \ rm -f "$(DESTDIR)$(library_includedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/src/ho_array_stat.c0000644000175000017500000001250611025233633014017 00000000000000 /*************************************************************************** * ho_array_stat.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_array_stat.h" #define square(x) ((x)*(x)) /** new ho_array_stat @param height hight of pixbuf in pixels @param width width of pixbuf in pixels @param threshold the threshold for making a mask @return newly allocated ho_array */ ho_array_stat * ho_array_stat_new (const int width, const int height, double threshold) { int x, y; ho_array_stat *pix = NULL; /* * allocate memory for pixbuf */ pix = (ho_array_stat *) malloc (sizeof (ho_array)); if (!pix) { return NULL; } /* * read header */ pix->width = width; pix->height = height; pix->size = 0; pix->threshold = threshold; /* * allocate memory for data */ pix->data_sums = malloc (pix->height * pix->width * sizeof (double)); if (!(pix->data_sums)) { free (pix); return NULL; } pix->data_squre_sums = malloc (pix->height * pix->width * sizeof (double)); if (!(pix->data_squre_sums)) { free (pix->data_sums); free (pix); return NULL; } /* init value to 0 */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { (pix->data_sums)[x + y * pix->width] = 0.0; (pix->data_squre_sums)[x + y * pix->width] = 0.0; } return pix; } /** free an ho_array_stat @param pix pointer to an ho_array @return FALSE */ int ho_array_stat_free (ho_array_stat * pix) { if (!pix) return TRUE; if (pix->data_sums) free (pix->data_sums); if (pix->data_squre_sums) free (pix->data_squre_sums); free (pix); return FALSE; } /** init an ho_array_stat from an ho_array @param pix pointer to an ho_array image @return FALSE */ unsigned char ho_array_stat_init (ho_array_stat * ar, const ho_array * pix) { double value; double value2; int x, y; /* copy data */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { value = ho_array_get (pix, x, y); value2 = square (value); ho_array_stat_set_sum (ar, x, y, value); ho_array_stat_set_sqr_sum (ar, x, y, value2); } /* incrase size counter */ ar->size = 1; return FALSE; } /** add an ho_array to an ho_array_stat @param pix pointer to an ho_array image @return FALSE */ unsigned char ho_array_stat_add (ho_array_stat * ar, const ho_array * pix) { double value; double value2; int x, y; /* copy data */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { value = ho_array_get (pix, x, y); value2 = square (value); ho_array_stat_add_sum (ar, x, y, value); ho_array_stat_add_sqr_sum (ar, x, y, value2); } /* incrase size counter */ ar->size++; return FALSE; } /** new ho_array from ho_array_stat @param hist pointer to an ho_array_stat @return newly allocated ho_array */ ho_array * ho_array_stat_to_array (const ho_array_stat * ar_st) { int x, y; double value; ho_array *m_out = NULL; /* allocate memory */ m_out = ho_array_new (ar_st->width, ar_st->height); if (!m_out) return NULL; /* copy data */ for (x = 0; x < ar_st->width; x++) for (y = 0; y < ar_st->height; y++) { value = ho_array_stat_get_sum (ar_st, x, y) / (double) (ar_st->size); ho_array_set (m_out, x, y, value); } return m_out; } /** new ho_array mask from ho_array_stat and an ho_array @param ar_st pointer to an ho_array_stst @param ar pointer to an ho_array @return newly allocated mask ho_array */ ho_array * ho_array_stat_to_array_mask (const ho_array_stat * ar_st, const ho_array * ar) { int x, y; double val; double avg, avg2, sd2; double threshold; ho_array *m_out = NULL; /* do we know somthing about the image */ if (ar_st->size < 1) return NULL; /* allocate memory */ m_out = ho_array_new (ar_st->width, ar_st->height); if (!m_out) return NULL; /* copy data */ for (x = 0; x < ar_st->width; x++) for (y = 0; y < ar_st->height; y++) { avg = ho_array_stat_get_sum (ar_st, x, y) / (double) (ar_st->size); avg2 = ho_array_stat_get_sqr_sum (ar_st, x, y) / (double) (ar_st->size); sd2 = avg2 - square (avg); threshold = square (ar_st->threshold) * sd2; val = ho_array_get (ar, x, y); ho_array_set (m_out, x, y, square (val - avg) - threshold); } return m_out; } libhocr-0.10.17/src/ho_pixbuf.c0000644000175000017500000013157211051626152013151 00000000000000 /*************************************************************************** * ho_pixbuf.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifdef USE_TIFF #include #endif #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_pixbuf.h" ho_pixbuf * ho_pixbuf_new (const unsigned char n_channels, const int width, const int height, const int rowstride) { ho_pixbuf *pix = NULL; /* * allocate memory for pixbuf */ pix = (ho_pixbuf *) malloc (sizeof (ho_pixbuf)); if (!pix) { return NULL; } /* * read header */ pix->n_channels = n_channels; pix->width = width; pix->height = height; if (rowstride) pix->rowstride = rowstride; else pix->rowstride = width * n_channels; /* * allocate memory for data (and set to white) */ pix->data = malloc (pix->height * pix->rowstride); if (!(pix->data)) { free (pix); return NULL; } memset ((void *) (pix->data), 255, pix->height * pix->rowstride); return pix; } ho_pixbuf * ho_pixbuf_clone (const ho_pixbuf * m) { ho_pixbuf *m_out; /* allocate memory */ m_out = ho_pixbuf_new (m->n_channels, m->width, m->height, m->rowstride); if (!m_out) return NULL; /* copy data */ memcpy (m_out->data, m->data, m_out->height * m_out->rowstride); return m_out; } ho_pixbuf * ho_pixbuf_clone_window (const ho_pixbuf * m, const int x, const int y, const int width, const int height) { ho_pixbuf *m_out; int x1, y1; unsigned char val; /* allocate memory */ m_out = ho_pixbuf_new (m->n_channels, width, height, 0); if (!m_out) return NULL; /* * copy data */ /* color */ if (m->n_channels > 1) { for (x1 = 0; x1 < width && x1 < m->width; x1++) for (y1 = 0; y1 < height && y1 < m->height; y1++) { /* FIXME: color always 3 channels ? */ val = ho_pixbuf_get (m, x + x1, y + y1, 0); ho_pixbuf_set (m_out, x1, y1, 0, val); val = ho_pixbuf_get (m, x + x1, y + y1, 1); ho_pixbuf_set (m_out, x1, y1, 1, val); val = ho_pixbuf_get (m, x + x1, y + y1, 2); ho_pixbuf_set (m_out, x1, y1, 2, val); } } /* gray */ else { for (x1 = 0; x1 < width && x1 < m->width; x1++) for (y1 = 0; y1 < height && y1 < m->height; y1++) { val = ho_pixbuf_get (m, x + x1, y + y1, 0); ho_pixbuf_set (m_out, x1, y1, 0, val); } } return m_out; } int ho_pixbuf_set_data (ho_pixbuf * pix, const char *data) { /* copy the pixels */ memcpy (pix->data, data, (pix->height * pix->rowstride)); return FALSE; }; string_data ho_pixbuf_get_data_string (ho_pixbuf * pix) { string_data out; out.data = (char *) malloc (pix->height * pix->rowstride); if (!out.data) { out.data = NULL; out.size = 0; } else { memcpy (out.data, pix->data, (pix->height * pix->rowstride)); out.data = pix->data; out.size = pix->height * pix->rowstride; } return out; } ho_pixbuf * ho_pixbuf_new_from_bitmap (const ho_bitmap * bit_in) { int x, y; ho_pixbuf *pix = NULL; pix = ho_pixbuf_new (1, bit_in->width, bit_in->height, 0); if (!pix) return NULL; for (x = 0; x < bit_in->width; x++) for (y = 0; y < bit_in->height; y++) ho_pixbuf_set (pix, x, y, 0, 255 * (1 - ho_bitmap_get (bit_in, x, y))); return pix; } ho_pixbuf * ho_pixbuf_new_from_objmap (const ho_objmap * obj_in, const unsigned char min, const unsigned char max) { int x, y; ho_pixbuf *pix = NULL; int index = 0; /* allocate memory */ pix = ho_pixbuf_new (3, obj_in->width, obj_in->height, 0); if (!pix) return NULL; /* copy pixels from gsl mtirxes */ for (x = 0; x < obj_in->width; x++) for (y = 0; y < obj_in->height; y++) { index = ho_objmap_get (obj_in, x, y); if (index) { /* set autput colors */ ho_pixbuf_set (pix, x, y, 0, min + (max - min) * (index % 12) / 12); ho_pixbuf_set (pix, x, y, 1, min + (max - min) * (index % 6) / 6); ho_pixbuf_set (pix, x, y, 2, min + (max - min) * (index % 9) / 9); } else { /* set white */ ho_pixbuf_set (pix, x, y, 0, 255); ho_pixbuf_set (pix, x, y, 1, 255); ho_pixbuf_set (pix, x, y, 2, 255); } } return pix; } ho_pixbuf * ho_pixbuf_new_from_layout (const ho_layout * lay_in, const unsigned char show_grid, const ho_bitmap * m_text, const unsigned char text_block_r, const unsigned char text_block_g, const unsigned char text_block_b, const unsigned char text_block_a, const unsigned char text_block_frame_width, const unsigned char line_block_r, const unsigned char line_block_g, const unsigned char line_block_b, const unsigned char line_block_a, const unsigned char line_block_frame_width, const unsigned char word_block_r, const unsigned char word_block_g, const unsigned char word_block_b, const unsigned char word_block_a, const unsigned char word_block_frame_width, const unsigned char font_block_r, const unsigned char font_block_g, const unsigned char font_block_b, const unsigned char font_block_a, const unsigned char font_block_frame_width) { ho_pixbuf *pix_out = NULL; ho_bitmap *m_block_frame = NULL; ho_bitmap *m_word_font_mask = NULL; int block_index; int line_index; int word_index; /* allocate */ pix_out = ho_pixbuf_new (3, lay_in->m_page_blocks_mask->width, lay_in->m_page_blocks_mask->height, 0); /* add text blocks */ m_block_frame = ho_bitmap_edge (lay_in->m_page_blocks_mask, text_block_frame_width); ho_pixbuf_draw_bitmap (pix_out, m_block_frame, text_block_r, text_block_g, text_block_b, text_block_a); ho_bitmap_free (m_block_frame); /* loop on all text blocks */ for (block_index = 0; block_index < lay_in->n_blocks; block_index++) { for (line_index = 0; line_index < lay_in->n_lines[block_index]; line_index++) { /* draw words */ ho_pixbuf_draw_bitmap (pix_out, lay_in->m_lines_words_mask[block_index][line_index], word_block_r, word_block_g, word_block_b, word_block_a); /* draw lines */ m_block_frame = ho_bitmap_edge (lay_in->m_lines_line_mask[block_index][line_index], line_block_frame_width); ho_pixbuf_draw_bitmap (pix_out, m_block_frame, line_block_r, line_block_g, line_block_b, line_block_a); ho_bitmap_free (m_block_frame); /* draw fonts */ for (word_index = 0; word_index < lay_in->n_words[block_index][line_index]; word_index++) { m_word_font_mask = lay_in->m_words_font_mask[block_index][line_index][word_index]; ho_pixbuf_draw_bitmap (pix_out, m_word_font_mask, font_block_r, font_block_g, font_block_b, font_block_a); } } } /* add grid */ if (show_grid) ho_pixbuf_draw_grid (pix_out, 120, 30, 255, 0, 0); /* add text */ if (m_text) ho_pixbuf_draw_bitmap (pix_out, m_text, 0, 0, 0, 255); return pix_out; } ho_pixbuf * ho_pixbuf_to_rgb (const ho_pixbuf * pix_in) { int x, y; ho_pixbuf *pix = NULL; unsigned char red, green, blue; /* allocate memory */ pix = ho_pixbuf_new (3, pix_in->width, pix_in->height, 0); if (!pix) return NULL; /* does original pix has the rgb channels ? */ if (pix_in->n_channels < 3) { /* copy gray pixels */ for (x = 0; x < pix_in->width; x++) for (y = 0; y < pix_in->height; y++) { red = ho_pixbuf_get (pix_in, x, y, 0); ho_pixbuf_set (pix, x, y, 0, red); ho_pixbuf_set (pix, x, y, 1, red); ho_pixbuf_set (pix, x, y, 2, red); } } else { /* copy color pixels */ for (x = 0; x < pix_in->width; x++) for (y = 0; y < pix_in->height; y++) { red = ho_pixbuf_get (pix_in, x, y, 0); green = ho_pixbuf_get (pix_in, x, y, 1); blue = ho_pixbuf_get (pix_in, x, y, 2); ho_pixbuf_set (pix, x, y, 0, red); ho_pixbuf_set (pix, x, y, 1, green); ho_pixbuf_set (pix, x, y, 2, blue); } } return pix; } int ho_pixbuf_free (ho_pixbuf * pix) { if (!pix) return TRUE; if (pix->data) free (pix->data); free (pix); return FALSE; } ho_pixbuf * ho_pixbuf_color_to_gray (const ho_pixbuf * pix) { ho_pixbuf *pix_gray = NULL; int x, y; unsigned char red, green, blue; /* does input has the rgb channels ? */ if (pix->n_channels < 3) return NULL; /* allocate memory */ pix_gray = ho_pixbuf_new (1, pix->width, pix->height, 0); if (!pix_gray) return NULL; for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { red = ho_pixbuf_get (pix, x, y, 0); green = ho_pixbuf_get (pix, x, y, 1); blue = ho_pixbuf_get (pix, x, y, 2); ho_pixbuf_set (pix_gray, x, y, 0, (ho_pixbuf_max3 (red, green, blue) + ho_pixbuf_min3 (red, green, blue)) / 2.0); } return pix_gray; } ho_pixbuf * ho_pixbuf_color_to_red (const ho_pixbuf * pix) { ho_pixbuf *pix_red = NULL; int x, y; unsigned char red; /* does input has the rgb channels ? */ if (pix->n_channels < 3) return NULL; /* allocate memory */ pix_red = ho_pixbuf_new (1, pix->width, pix->height, 0); if (!pix_red) return NULL; for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { red = ho_pixbuf_get (pix, x, y, 0); ho_pixbuf_set (pix_red, x, y, 0, red); } return pix_red; } ho_pixbuf * ho_pixbuf_color_to_green (const ho_pixbuf * pix) { ho_pixbuf *pix_green = NULL; int x, y; unsigned char green; /* does input has the rgb channels ? */ if (pix->n_channels < 3) return NULL; /* allocate memory */ pix_green = ho_pixbuf_new (1, pix->width, pix->height, 0); if (!pix_green) return NULL; for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { green = ho_pixbuf_get (pix, x, y, 1); ho_pixbuf_set (pix_green, x, y, 0, green); } return pix_green; } ho_pixbuf * ho_pixbuf_color_to_blue (const ho_pixbuf * pix) { ho_pixbuf *pix_blue = NULL; int x, y; unsigned char blue; /* does input has the rgb channels ? */ if (pix->n_channels < 3) return NULL; /* allocate memory */ pix_blue = ho_pixbuf_new (1, pix->width, pix->height, 0); if (!pix_blue) return NULL; for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { blue = ho_pixbuf_get (pix, x, y, 2); ho_pixbuf_set (pix_blue, x, y, 0, blue); } return pix_blue; } ho_pixbuf * ho_pixbuf_scale2 (const ho_pixbuf * pix) { ho_pixbuf *pix_scaled = NULL; int x, y; unsigned char neighbors[4]; /* is input gray ? */ if (pix->n_channels != 1 || pix->width < 3 || pix->height < 3) return NULL; /* allocate memory */ pix_scaled = ho_pixbuf_new (1, pix->width * 2 - 2, pix->height * 2 - 2, 0); if (!pix_scaled) return NULL; for (x = 0; x < pix->width - 1; x++) for (y = 0; y < pix->height - 1; y++) { neighbors[0] = (pix->data)[x + y * pix->rowstride]; neighbors[1] = (pix->data)[x + 1 + y * pix->rowstride]; neighbors[2] = (pix->data)[x + (y + 1) * pix->rowstride]; neighbors[3] = (pix->data)[x + 1 + (y + 1) * pix->rowstride]; (pix_scaled->data)[(x * 2) + (y * 2) * pix_scaled->rowstride] = neighbors[0]; (pix_scaled->data)[(x * 2) + 1 + (y * 2) * pix_scaled->rowstride] = (neighbors[0] + neighbors[1]) / 2; (pix_scaled->data)[(x * 2) + ((y * 2) + 1) * pix_scaled->rowstride] = (neighbors[0] + neighbors[2]) / 2; (pix_scaled->data)[(x * 2) + 1 + ((y * 2) + 1) * pix_scaled->rowstride] = (neighbors[0] + neighbors[1] + neighbors[2] + neighbors[3]) / 4; } return pix_scaled; } ho_pixbuf * ho_pixbuf_scale3 (const ho_pixbuf * pix) { ho_pixbuf *pix_scaled = NULL; int x, y; unsigned char neighbors[4]; /* is input gray ? */ if (pix->n_channels != 1 || pix->width < 3 || pix->height < 3) return NULL; /* allocate memory */ pix_scaled = ho_pixbuf_new (1, pix->width * 3 - 3, pix->height * 3 - 3, 0); if (!pix_scaled) return NULL; for (x = 0; x < pix->width - 1; x++) for (y = 0; y < pix->height - 1; y++) { neighbors[0] = (pix->data)[x + y * pix->rowstride]; neighbors[1] = (pix->data)[x + 1 + y * pix->rowstride]; neighbors[2] = (pix->data)[x + (y + 1) * pix->rowstride]; neighbors[3] = (pix->data)[x + 1 + (y + 1) * pix->rowstride]; (pix_scaled->data)[(x * 3) + (y * 3) * pix_scaled->rowstride] = neighbors[0]; (pix_scaled->data)[(x * 3) + 1 + (y * 3) * pix_scaled->rowstride] = (neighbors[0] * 2 + neighbors[1]) / 3; (pix_scaled->data)[(x * 3) + 2 + (y * 3) * pix_scaled->rowstride] = (neighbors[0] + neighbors[1] * 2) / 3; (pix_scaled->data)[(x * 3) + ((y * 3) + 1) * pix_scaled->rowstride] = (neighbors[0] * 2 + neighbors[2]) / 3; (pix_scaled->data)[(x * 3) + ((y * 3) + 2) * pix_scaled->rowstride] = (neighbors[0] + neighbors[2] * 2) / 3; (pix_scaled->data)[(x * 3) + 1 + ((y * 3) + 1) * pix_scaled->rowstride] = (neighbors[0] * 3 + neighbors[1] + neighbors[2] + neighbors[3]) / 6; (pix_scaled->data)[(x * 3) + 2 + ((y * 3) + 1) * pix_scaled->rowstride] = (neighbors[0] + neighbors[1] * 3 + neighbors[2] + neighbors[3]) / 6; (pix_scaled->data)[(x * 3) + 1 + ((y * 3) + 2) * pix_scaled->rowstride] = (neighbors[0] + neighbors[1] + neighbors[2] * 3 + neighbors[3]) / 6; (pix_scaled->data)[(x * 3) + 2 + ((y * 3) + 2) * pix_scaled->rowstride] = (neighbors[0] + neighbors[1] + neighbors[2] + neighbors[3] * 3) / 6; } return pix_scaled; } ho_pixbuf * ho_pixbuf_scale4 (const ho_pixbuf * pix) { /* FIXME: find a better way to scale by 4 and 8 */ ho_pixbuf *pix_scaled2 = NULL; ho_pixbuf *pix_scaled4 = NULL; pix_scaled2 = ho_pixbuf_scale2 (pix); if (!pix_scaled2) return NULL; pix_scaled4 = ho_pixbuf_scale2 (pix_scaled2); ho_pixbuf_free (pix_scaled2); return pix_scaled4; } ho_pixbuf * ho_pixbuf_scale8 (const ho_pixbuf * pix) { ho_pixbuf *pix_scaled4 = NULL; ho_pixbuf *pix_scaled8 = NULL; pix_scaled4 = ho_pixbuf_scale4 (pix); if (!pix_scaled4) return NULL; pix_scaled8 = ho_pixbuf_scale2 (pix_scaled4); ho_pixbuf_free (pix_scaled4); return pix_scaled8; } ho_pixbuf * ho_pixbuf_scale (const ho_pixbuf * pix, const unsigned char scale) { /* is input sane ? */ if (scale < 2 || pix->n_channels != 1 || pix->width < 3 || pix->height < 3) return NULL; if (scale == 2) return ho_pixbuf_scale2 (pix); if (scale == 3) return ho_pixbuf_scale3 (pix); if (scale == 4) return ho_pixbuf_scale4 (pix); /* FIXME: scale more them 8 ? */ if (scale > 4) return ho_pixbuf_scale8 (pix); return NULL; } unsigned char ho_pixbuf_minmax (const ho_pixbuf * pix, unsigned char *min, unsigned char *max) { int x, y; *min = 0; *max = 255; /* is input gray ? */ if (pix->n_channels != 1) return TRUE; for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { if (*min > (pix->data)[x + y * pix->rowstride]) *min = (pix->data)[x + y * pix->rowstride]; if (*max < (pix->data)[x + y * pix->rowstride]) *max = (pix->data)[x + y * pix->rowstride]; } return FALSE; } ho_pixbuf * ho_pixbuf_linear_filter (const ho_pixbuf * pix) { ho_pixbuf *pix_gray = NULL; int x, y; unsigned char min, max; /* is input gray ? */ if (pix->n_channels != 1) return NULL; /* allocate memory */ pix_gray = ho_pixbuf_new (1, pix->width, pix->height, 0); if (!pix_gray) return NULL; ho_pixbuf_minmax (pix, &min, &max); for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { (pix_gray->data)[x + y * pix_gray->rowstride] = 255 * ((pix->data)[x + y * pix->rowstride] - min) / (max - min); } return pix_gray; } ho_bitmap * ho_pixbuf_to_bitmap (const ho_pixbuf * pix, unsigned char threshold) { ho_pixbuf *gray_pix = NULL; ho_bitmap *m_out = NULL; int x, y; /* convert threshold from 0..100 to 0..255 */ threshold = 255 * threshold / 100; /* if pix is color convert to gray scale */ if (pix->n_channels > 1) gray_pix = ho_pixbuf_color_to_gray (pix); else gray_pix = ho_pixbuf_clone (pix); if (!threshold) threshold = 153; /* allocate memory */ m_out = ho_bitmap_new (gray_pix->width, gray_pix->height); if (!m_out) return NULL; /* copy data */ for (x = 0; x < gray_pix->width; x++) for (y = 0; y < gray_pix->height; y++) if ((gray_pix->data)[x + y * gray_pix->rowstride] < threshold) ho_bitmap_set (m_out, x, y); /* free gray pix */ ho_pixbuf_free (gray_pix); return m_out; } ho_bitmap * ho_pixbuf_to_bitmap_by_color (const ho_pixbuf * pix, unsigned char min_red, unsigned char max_red, unsigned char min_green, unsigned char max_green, unsigned char min_blue, unsigned char max_blue) { ho_bitmap *m_out = NULL; int x, y; /* if pix is not color exit */ if (pix->n_channels < 3) return NULL; /* allocate memory */ m_out = ho_bitmap_new (pix->width, pix->height); if (!m_out) return NULL; /* copy data */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) { if ( ((pix->data)[x + y * pix->rowstride] >= min_red) && ((pix->data)[x + y * pix->rowstride] < max_red) && ((pix->data)[x + y * pix->rowstride + 1] >= min_green) && ((pix->data)[x + y * pix->rowstride + 1] < max_green) && ((pix->data)[x + y * pix->rowstride + 2] >= min_blue) && ((pix->data)[x + y * pix->rowstride + 2] < max_blue)) ho_bitmap_set (m_out, x, y); } return m_out; } ho_bitmap * ho_pixbuf_to_bitmap_adaptive (const ho_pixbuf * pix, unsigned char threshold, unsigned char size, unsigned char adaptive_threshold) { ho_bitmap *m_out = NULL; int x, y; int i, j; unsigned char locale_thereshold; double sum; int hlf_size = size / 2; double size_aquare = size * size; double factor = (double) adaptive_threshold / 100.0; /* convert threshold from 0..100 to 0..255 */ threshold = 255 * threshold / 100; /* is input gray ? */ if (pix->n_channels != 1) return NULL; /* set defaults */ if (!threshold) threshold = 0; if (!factor) factor = 6.0 / 8.0; if (!size) { size = 70; hlf_size = size / 2; size_aquare = size * size; } /* allocate memory */ m_out = ho_bitmap_new (pix->width, pix->height); if (!m_out) return NULL; /* init threshold matrix to 0.5 */ for (x = 0; x < hlf_size; x++) for (y = 0; y < pix->height; y++) if (ho_pixbuf_get (pix, x, y, 0) < 127) ho_bitmap_set (m_out, x, y); for (x = pix->width - size; x < pix->width; x++) for (y = 0; y < pix->height; y++) if (ho_pixbuf_get (pix, x, y, 0) < 127) ho_bitmap_set (m_out, x, y); for (x = 0; x < pix->width; x++) for (y = 0; y < hlf_size; y++) if (ho_pixbuf_get (pix, x, y, 0) < 127) ho_bitmap_set (m_out, x, y); for (x = 0; x < pix->width; x++) for (y = pix->height - size; y < pix->height; y++) if (ho_pixbuf_get (pix, x, y, 0) < 127) ho_bitmap_set (m_out, x, y); /* copy data */ for (x = hlf_size; x < pix->width - hlf_size; x += hlf_size) for (y = hlf_size; y < pix->height - hlf_size; y += hlf_size) { /* get avg */ sum = 0; for (i = -hlf_size; i < hlf_size; i++) for (j = -hlf_size; j < hlf_size; j++) sum += ho_pixbuf_get (pix, x + i, y + j, 0); /* calculate locale threshold */ locale_thereshold = (unsigned char) (factor * sum / size_aquare); if (locale_thereshold < threshold) locale_thereshold = threshold; for (i = -hlf_size; i < 0; i++) for (j = -hlf_size; j < 0; j++) if (ho_pixbuf_get (pix, x + i, y + j, 0) < locale_thereshold) ho_bitmap_set (m_out, x + i, y + j); } return m_out; } ho_bitmap * ho_pixbuf_to_bitmap_adaptive_fine (const ho_pixbuf * pix, unsigned char threshold, unsigned char size, unsigned char adaptive_threshold) { ho_pixbuf *m_thresholds = NULL; ho_bitmap *m_out = NULL; int x, y; int i, j; unsigned char locale_thereshold; double sum, first_row, last_row; double hlf_size = size / 2.0; double size_aquare = size * size; double factor = (double) adaptive_threshold / 100.0; /* convert threshold from 0..100 to 0..255 */ threshold = 255 * threshold / 100; /* is input gray ? */ if (pix->n_channels != 1) return NULL; /* set defaults */ if (!threshold) threshold = 0; if (!factor) factor = 80.0 / 100.0; if (!size) { size = 70; hlf_size = size / 2.0; size_aquare = size * size; } /* allocate memory */ m_out = ho_bitmap_new (pix->width, pix->height); if (!m_out) return NULL; m_thresholds = ho_pixbuf_new (1, pix->width, pix->height, 0); if (!m_thresholds) { ho_bitmap_free (m_out); return NULL; } /* init threshold matrix to 0.5 */ for (x = 0; x < hlf_size; x++) for (y = 0; y < pix->height; y++) ho_pixbuf_set (m_thresholds, x, y, 0, 127); for (x = pix->width - hlf_size; x < pix->width; x++) for (y = 0; y < pix->height; y++) ho_pixbuf_set (m_thresholds, x, y, 0, 127); for (x = 0; x < pix->width; x++) for (y = 0; y < hlf_size; y++) ho_pixbuf_set (m_thresholds, x, y, 0, 127); for (x = 0; x < pix->width; x++) for (y = pix->height - hlf_size; y < pix->height; y++) ho_pixbuf_set (m_thresholds, x, y, 0, 127); /* create threshold matix */ for (x = hlf_size; x < pix->width - hlf_size; x++) { /* calculate sum of first erea */ y = hlf_size; sum = 0; for (i = -hlf_size; i < hlf_size; i++) for (j = -hlf_size; j < hlf_size; j++) { sum += (pix->data)[(x + i) + (y + j) * pix->rowstride]; } /* get the sum of elemnts in first row of area */ first_row = 0; for (i = -hlf_size; i < hlf_size; i++) { first_row += (pix->data)[(x + i) + (y - (int) hlf_size) * pix->rowstride]; } last_row = 0; for (i = -hlf_size; i < hlf_size; i++) { last_row += (pix->data)[(x + i) + (y + (int) hlf_size) * pix->rowstride]; } /* calculate locale threshold */ locale_thereshold = (sum / size_aquare) * factor; if (locale_thereshold < threshold) ho_pixbuf_set (m_thresholds, x, y, 0, threshold); else ho_pixbuf_set (m_thresholds, x, y, 0, locale_thereshold); /* run rest of the height */ for (y = hlf_size + 1; y < pix->height - (int) hlf_size; y++) { /* get avg */ sum += last_row - first_row; first_row = 0; for (i = -hlf_size; i < hlf_size; i++) { first_row += (pix->data)[(x + i) + (y - (int) hlf_size) * pix->rowstride]; } last_row = 0; for (i = -hlf_size; i < hlf_size; i++) { last_row += (pix->data)[(x + i) + (y + (int) hlf_size) * pix->rowstride]; } /* calculate locale threshold */ locale_thereshold = (sum / size_aquare) * factor; if (locale_thereshold < threshold) ho_pixbuf_set (m_thresholds, x, y, 0, threshold); else ho_pixbuf_set (m_thresholds, x, y, 0, locale_thereshold); } } /* do thresholding */ for (x = 0; x < pix->width; x++) for (y = 0; y < pix->height; y++) if (ho_pixbuf_get (pix, x, y, 0) < ho_pixbuf_get (m_thresholds, x, y, 0)) ho_bitmap_set (m_out, x, y); ho_pixbuf_free (m_thresholds); return m_out; } ho_bitmap * ho_pixbuf_to_bitmap_wrapper (const ho_pixbuf * pix_in, const unsigned char scale, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, const unsigned char size) { ho_pixbuf *pix = NULL; ho_pixbuf *pix_temp = NULL; ho_bitmap *m_bw = NULL; /* if pix is color convert to gray scale */ if (pix_in->n_channels > 1) pix = ho_pixbuf_color_to_gray (pix_in); else pix = ho_pixbuf_clone (pix_in); if (!pix) return NULL; /* streach picture grays */ pix_temp = ho_pixbuf_linear_filter (pix); ho_pixbuf_free (pix); if (!pix_temp) return NULL; pix = pix_temp; /* scale */ if (scale > 1) { pix_temp = ho_pixbuf_scale (pix, scale); ho_pixbuf_free (pix); if (!pix_temp) return NULL; pix = pix_temp; } /* convert to b/w bitmap */ switch (adaptive) { case 0: m_bw = ho_pixbuf_to_bitmap_adaptive (pix, threshold, size, a_threshold); break; case 1: m_bw = ho_pixbuf_to_bitmap (pix, threshold); break; case 2: m_bw = ho_pixbuf_to_bitmap_adaptive_fine (pix, threshold, size, a_threshold); break; default: m_bw = ho_pixbuf_to_bitmap_adaptive (pix, threshold, size, a_threshold); break; } ho_pixbuf_free (pix); return m_bw; } int ho_pixbuf_draw_bitmap (ho_pixbuf * m, const ho_bitmap * bit_in, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha) { int x, y; unsigned char new_red; unsigned char new_green; unsigned char new_blue; /* check for bitmap origin, if this is a sub window draw at its origin */ if (bit_in->x != 0 || bit_in->y != 0 || m->width > bit_in->width || m->height > bit_in->height) ho_pixbuf_draw_bitmap_at (m, bit_in, bit_in->x, bit_in->y, red, green, blue, alpha); /* sanity check */ if (m->width != bit_in->width || m->height != bit_in->height) return TRUE; /* is pixbuf color ? */ if (m->n_channels < 3) { /* gray scale */ for (x = 0; x < bit_in->width; x++) for (y = 0; y < bit_in->height; y++) if (ho_bitmap_get (bit_in, x, y)) { new_red = alpha * red / 255 + (255 - alpha) * ho_pixbuf_get (m, x, y, 0) / 255; ho_pixbuf_set (m, x, y, 0, new_red); } } else { /* color */ for (x = 0; x < bit_in->width; x++) for (y = 0; y < bit_in->height; y++) if (ho_bitmap_get (bit_in, x, y)) { new_red = alpha * red / 255 + (255 - alpha) * ho_pixbuf_get (m, x, y, 0) / 255; new_green = alpha * green / 255 + (255 - alpha) * ho_pixbuf_get (m, x, y, 1) / 255; new_blue = alpha * blue / 255 + (255 - alpha) * ho_pixbuf_get (m, x, y, 2) / 255; ho_pixbuf_set (m, x, y, 0, new_red); ho_pixbuf_set (m, x, y, 1, new_green); ho_pixbuf_set (m, x, y, 2, new_blue); } } return FALSE; } int ho_pixbuf_draw_bitmap_at (ho_pixbuf * m, const ho_bitmap * bit_in, const int x1, const int y1, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha) { int x, y; unsigned char new_red; unsigned char new_green; unsigned char new_blue; /* is pixbuf color ? */ if (m->n_channels < 3) { /* gray scale */ for (x = 0; x < bit_in->width; x++) for (y = 0; y < bit_in->height; y++) if ((x + x1) >= 0 && (x + x1) < m->width && (y + y1) >= 0 && (y + y1) < m->height) if (ho_bitmap_get (bit_in, x, y)) { new_red = alpha * red / 255 + (255 - alpha) * ho_pixbuf_get (m, (x + x1), (y + y1), 0) / 255; ho_pixbuf_set (m, (x + x1), (y + y1), 0, new_red); } } else { /* color */ for (x = 0; x < bit_in->width; x++) for (y = 0; y < bit_in->height; y++) if ((x + x1) >= 0 && (x + x1) < m->width && (y + y1) >= 0 && (y + y1) < m->height) if (ho_bitmap_get (bit_in, x, y)) { new_red = alpha * red / 255 + (255 - alpha) * ho_pixbuf_get (m, (x + x1), (y + y1), 0) / 255; new_green = alpha * green / 255 + (255 - alpha) * ho_pixbuf_get (m, (x + x1), (y + y1), 1) / 255; new_blue = alpha * blue / 255 + (255 - alpha) * ho_pixbuf_get (m, (x + x1), (y + y1), 2) / 255; ho_pixbuf_set (m, (x + x1), (y + y1), 0, new_red); ho_pixbuf_set (m, (x + x1), (y + y1), 1, new_green); ho_pixbuf_set (m, (x + x1), (y + y1), 2, new_blue); } } return FALSE; } int ho_pixbuf_draw_line (ho_pixbuf * m, const int x1, const int y1, const int x2, const int y2, const unsigned char red, const unsigned char green, const unsigned char blue) { double x, step_x; double y, step_y; int x_start = x1; int x_end = x2; int y_start = y1; int y_end = y2; step_x = ((double) x2 - (double) x1) * ((double) x2 - (double) x1); step_y = ((double) y2 - (double) y1) * ((double) y2 - (double) y1); if (step_y > step_x) { /* vertical line */ if (y1 > y2) { x_start = x2; x_end = x1; y_start = y2; y_end = y1; } x = (double) x_start; step_x = ((double) x_end - (double) x_start) / ((double) y_end - (double) y_start); for (y = y_start; y <= y_end; y++) { (m->data)[(int) x * m->n_channels + (int) y * m->rowstride] = red; if (m->n_channels >= 3) { (m->data)[(int) x * m->n_channels + (int) y * m->rowstride + 1] = green; (m->data)[(int) x * m->n_channels + (int) y * m->rowstride + 2] = blue; } x += step_x; } } else { /* horizontal line */ if (x1 > x2) { x_start = x2; x_end = x1; y_start = y2; y_end = y1; } y = (double) y_start; step_y = ((double) y_end - (double) y_start) / ((double) x_end - (double) x_start); for (x = x_start; x <= x_end; x++) { (m->data)[(int) x * m->n_channels + (int) y * m->rowstride] = red; if (m->n_channels >= 3) { (m->data)[(int) x * m->n_channels + (int) y * m->rowstride + 1] = green; (m->data)[(int) x * m->n_channels + (int) y * m->rowstride + 2] = blue; } y += step_y; } } return FALSE; } int ho_pixbuf_draw_box (ho_pixbuf * m, const int x, const int y, const int width, const int height, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha) { int x1, y1; int r, g, b; /* draw */ for (x1 = x; x1 < (x + width) && x1 < m->width; x1++) for (y1 = y; y1 < (y + height) && y1 < m->height; y1++) { r = ((int) ho_pixbuf_get (m, x1, y1, 0) * (255 - (int) alpha) + (int) red * (int) alpha) / 255; g = ((int) ho_pixbuf_get (m, x1, y1, 1) * (255 - (int) alpha) + (int) green * (int) alpha) / 255; b = ((int) ho_pixbuf_get (m, x1, y1, 2) * (255 - (int) alpha) + (int) blue * (int) alpha) / 255; ho_pixbuf_set (m, x1, y1, 0, r); ho_pixbuf_set (m, x1, y1, 1, g); ho_pixbuf_set (m, x1, y1, 2, b); } return FALSE; } int ho_pixbuf_draw_box_empty (ho_pixbuf * m, const int x, const int y, const int width, const int height, const unsigned char red, const unsigned char green, const unsigned char blue) { int x1, y1; /* draw */ /* horizontal lines */ for (x1 = x; x1 < (x + width) && x1 < m->width; x1++) { ho_pixbuf_set (m, x1, y, 0, red); ho_pixbuf_set (m, x1, y, 1, green); ho_pixbuf_set (m, x1, y, 2, blue); ho_pixbuf_set (m, x1, y + height - 1, 0, red); ho_pixbuf_set (m, x1, y + height - 1, 1, green); ho_pixbuf_set (m, x1, y + height - 1, 2, blue); } /* vertical lines */ for (y1 = y; y1 < (y + height) && y1 < m->height; y1++) { ho_pixbuf_set (m, x, y1, 0, red); ho_pixbuf_set (m, x, y1, 1, green); ho_pixbuf_set (m, x, y1, 2, blue); ho_pixbuf_set (m, x + width - 1, y1, 0, red); ho_pixbuf_set (m, x + width - 1, y1, 1, green); ho_pixbuf_set (m, x + width - 1, y1, 2, blue); } return FALSE; } int ho_pixbuf_draw_horizontal_scale (ho_pixbuf * m, const int x1, const int y1, const int length, const int step, const unsigned char red, const unsigned char green, const unsigned char blue) { int x; for (x = 0; x <= length; x++) { ho_pixbuf_set (m, x1 + x, y1, 0, red); if (m->n_channels >= 3) { ho_pixbuf_set (m, x1 + x, y1, 1, green); ho_pixbuf_set (m, x1 + x, y1, 2, blue); } /* draw a vertical line evry step */ if (!(x % step)) { ho_pixbuf_set (m, x1 + x, y1 - 4, 0, red); ho_pixbuf_set (m, x1 + x, y1 - 3, 0, red); ho_pixbuf_set (m, x1 + x, y1 - 2, 0, red); ho_pixbuf_set (m, x1 + x, y1 + 2, 0, red); ho_pixbuf_set (m, x1 + x, y1 + 3, 0, red); ho_pixbuf_set (m, x1 + x, y1 + 4, 0, red); if (m->n_channels >= 3) { ho_pixbuf_set (m, x1 + x, y1 - 4, 1, green); ho_pixbuf_set (m, x1 + x, y1 - 3, 1, green); ho_pixbuf_set (m, x1 + x, y1 - 2, 1, green); ho_pixbuf_set (m, x1 + x, y1 + 2, 1, green); ho_pixbuf_set (m, x1 + x, y1 + 3, 1, green); ho_pixbuf_set (m, x1 + x, y1 + 4, 1, green); ho_pixbuf_set (m, x1 + x, y1 - 4, 2, blue); ho_pixbuf_set (m, x1 + x, y1 - 3, 2, blue); ho_pixbuf_set (m, x1 + x, y1 - 2, 2, blue); ho_pixbuf_set (m, x1 + x, y1 + 2, 2, blue); ho_pixbuf_set (m, x1 + x, y1 + 3, 2, blue); ho_pixbuf_set (m, x1 + x, y1 + 4, 2, blue); } } } return FALSE; } int ho_pixbuf_draw_vertical_scale (ho_pixbuf * m, const int x1, const int y1, const int length, const int step, const unsigned char red, const unsigned char green, const unsigned char blue) { int y; for (y = 0; y <= length; y++) { ho_pixbuf_set (m, x1, y1 + y, 0, red); if (m->n_channels >= 3) { ho_pixbuf_set (m, x1, y1 + y, 1, green); ho_pixbuf_set (m, x1, y1 + y, 2, blue); } /* draw a vertical line evry step */ if (!(y % step)) { ho_pixbuf_set (m, x1 - 4, y1 + y, 0, red); ho_pixbuf_set (m, x1 - 3, y1 + y, 0, red); ho_pixbuf_set (m, x1 - 2, y1 + y, 0, red); ho_pixbuf_set (m, x1 + 2, y1 + y, 0, red); ho_pixbuf_set (m, x1 + 3, y1 + y, 0, red); ho_pixbuf_set (m, x1 + 4, y1 + y, 0, red); if (m->n_channels >= 3) { ho_pixbuf_set (m, x1 - 4, y1 + y, 1, green); ho_pixbuf_set (m, x1 - 3, y1 + y, 1, green); ho_pixbuf_set (m, x1 - 2, y1 + y, 1, green); ho_pixbuf_set (m, x1 + 2, y1 + y, 1, green); ho_pixbuf_set (m, x1 + 3, y1 + y, 1, green); ho_pixbuf_set (m, x1 + 4, y1 + y, 1, green); ho_pixbuf_set (m, x1 - 4, y1 + y, 2, blue); ho_pixbuf_set (m, x1 - 3, y1 + y, 2, blue); ho_pixbuf_set (m, x1 - 2, y1 + y, 2, blue); ho_pixbuf_set (m, x1 + 2, y1 + y, 2, blue); ho_pixbuf_set (m, x1 + 3, y1 + y, 2, blue); ho_pixbuf_set (m, x1 + 4, y1 + y, 2, blue); } } } return FALSE; } int ho_pixbuf_draw_grid (ho_pixbuf * m, const int size, const int step, const unsigned char red, const unsigned char green, const unsigned char blue) { int i; /* check fot matrix size */ if (m->width < 120 || m->height < 120) return TRUE; /* adding grid */ for (i = 60; i < (m->width - 60); i += size) { ho_pixbuf_draw_vertical_scale (m, i, 30, m->height - 60, step, red, green, blue); } for (i = 60; i < (m->height - 60); i += size) { ho_pixbuf_draw_horizontal_scale (m, 30, i, m->width - 60, step, red, green, blue); } return FALSE; } int ho_pixbuf_draw_rgb_bitmap (ho_pixbuf * m, const ho_bitmap * bit_in_red, const ho_bitmap * bit_in_green, const ho_bitmap * bit_in_blue) { int x, y; unsigned char new_red; unsigned char new_green; unsigned char new_blue; /* sanity check */ if (m->width != bit_in_red->width || m->height != bit_in_red->height) return TRUE; /* is pixbuf color ? */ if (m->n_channels < 3) return TRUE; for (x = 0; x < bit_in_red->width; x++) for (y = 0; y < bit_in_red->height; y++) { new_red = 255 * ho_bitmap_get (bit_in_red, x, y); new_green = 255 * ho_bitmap_get (bit_in_green, x, y); new_blue = 255 * ho_bitmap_get (bit_in_blue, x, y); ho_pixbuf_set (m, x, y, 0, new_red); ho_pixbuf_set (m, x, y, 1, new_green); ho_pixbuf_set (m, x, y, 2, new_blue); } return FALSE; } int ho_pixbuf_draw_rgb_pixbufs (ho_pixbuf * m, const ho_pixbuf * bit_in_red, const ho_pixbuf * bit_in_green, const ho_pixbuf * bit_in_blue) { int x, y; unsigned char new_red; unsigned char new_green; unsigned char new_blue; /* sanity check */ if (m->width != bit_in_red->width || m->height != bit_in_red->height) return TRUE; /* is pixbuf color ? */ if (m->n_channels < 3 || bit_in_red->n_channels > 1) return TRUE; for (x = 0; x < bit_in_red->width; x++) for (y = 0; y < bit_in_red->height; y++) { new_red = ho_pixbuf_get (bit_in_red, x, y, 0); new_green = ho_pixbuf_get (bit_in_green, x, y, 0); new_blue = ho_pixbuf_get (bit_in_blue, x, y, 0); ho_pixbuf_set (m, x, y, 0, new_red); ho_pixbuf_set (m, x, y, 1, new_green); ho_pixbuf_set (m, x, y, 2, new_blue); } return FALSE; } unsigned char ho_pbm_getc (FILE * file) { unsigned char ch; int comment = FALSE; do { ch = getc (file); if (ch == '\n') comment = FALSE; else if (ch == '#') comment = TRUE; } while (comment); return ch; } int ho_pbm_getint (FILE * file) { unsigned char ch; int i = 0; /* pass on white spaces */ do { ch = ho_pbm_getc (file); } while (ch == ' ' || ch == '\n' || ch == '\t'); /* read a number */ do { i = (i * 10) + (ch - '0'); ch = ho_pbm_getc (file); } while (ch >= '0' && ch <= '9'); return i; } int ho_pbm_getbit (FILE * file) { static unsigned char byte = 0; static unsigned char mask = 0; int return_bit; /* if file = 0, reset mask */ if (!file) { mask = 0; return 0; } /* if we need a new byte read it from file */ if (mask == 0) { mask = 0x80; byte = getc (file); } /* get the bit */ return_bit = (byte & mask) ? 0 : 255; /* update mask */ mask >>= 1; return return_bit; } ho_pixbuf * ho_pixbuf_pnm_load (const char *filename) { char ch1, ch2; ho_pixbuf *pix = NULL; FILE *file = NULL; unsigned char use_stdin = 0; unsigned char n_channels = 0; unsigned char val = 0; int width = 0; int height = 0; int x, y, rowstride; /* if no input file name use stdin for input */ if (!filename || filename[0] == '\0' || (filename[0] == '-' && filename[1] == '\0')) { /* use stdin */ file = stdin; use_stdin = 1; } else { /* open file */ file = fopen (filename, "r"); if (!file) return NULL; } /* read magic number "P?" for pbm file */ ch1 = ho_pbm_getc (file); ch2 = ho_pbm_getc (file); if (ch1 != 'P' || (ch2 != '6' && ch2 != '5' && ch2 != '4')) { /* bad magic */ if (!use_stdin) fclose (file); return NULL; } /* read header */ n_channels = ((ch2 == '6') ? 3 : 1); width = ho_pbm_getint (file); height = ho_pbm_getint (file); if (ch2 == '4') { /* read bites per pixel */ /* create a new pixbuf */ pix = ho_pixbuf_new (n_channels, width, height, 0); rowstride = 8 * (width / 8 + 1); if (pix) for (y = 0; y < height; y++) { /* reset mask to 0 on a new line */ ho_pbm_getbit (0); /* get line data */ for (x = 0; x < rowstride; x++) { val = ho_pbm_getbit (file); if (x < width) ho_pixbuf_set (pix, x, y, 0, val); } } } else { /* read bytes per pixel */ /* check for color depth */ if (ho_pbm_getint (file) > 255) { /* bad bits per pixel */ if (!use_stdin) fclose (file); return NULL; } /* create a new pixbuf */ pix = ho_pixbuf_new (n_channels, width, height, 0); if (pix) fread (pix->data, 1, pix->height * pix->rowstride, file); } if (!use_stdin) fclose (file); /* return the new pixbuf to user */ return pix; } int ho_pixbuf_pnm_save (const ho_pixbuf * pix, const char *filename) { FILE *file = NULL; if (pix->n_channels != 3 && pix->n_channels != 1) { /* bad magic */ return TRUE; } file = fopen (filename, "wb"); if (!file) return TRUE; /* print header */ fprintf (file, "P%c %d %d 255\n", ((pix->n_channels == 3) ? '6' : '5'), pix->width, pix->height); /* this might be a huge write... */ fwrite (pix->data, 1, pix->height * pix->rowstride, file); fclose (file); return FALSE; } #ifdef USE_TIFF ho_pixbuf * ho_pixbuf_bw_tiff_load (const char *filename) { /* This function is copied from a web tutorial in: * http://www-128.ibm.com/developerworks/linux/library/l-libtiff/ */ int x, y; ho_pixbuf *pix = NULL; TIFF *image; uint16 photo, bps, spp, fillorder; uint32 width; uint32 height; uint32 rowstride; tsize_t stripSize; unsigned long imageOffset, result; int stripMax, stripCount; char *buffer, tempbyte; unsigned long bufferSize, count; /* Open the TIFF image */ if ((image = TIFFOpen (filename, "r")) == NULL) { /* no file */ return NULL; } /* Check that it is of a type that we support */ if ((TIFFGetField (image, TIFFTAG_BITSPERSAMPLE, &bps) == 0) || (bps != 1)) { /* not a 1 bit image */ TIFFClose (image); return NULL; } if ((TIFFGetField (image, TIFFTAG_SAMPLESPERPIXEL, &spp) == 0) || (spp != 1)) { /* not a black and white image */ TIFFClose (image); return NULL; } /* Read in the possibly multiple strips */ stripSize = TIFFStripSize (image); stripMax = TIFFNumberOfStrips (image); imageOffset = 0; bufferSize = TIFFNumberOfStrips (image) * stripSize; if ((buffer = (char *) malloc (bufferSize)) == NULL) { /* not memory */ TIFFClose (image); return NULL; } for (stripCount = 0; stripCount < stripMax; stripCount++) { if ((result = TIFFReadEncodedStrip (image, stripCount, buffer + imageOffset, stripSize)) == -1) { /* read error */ free (buffer); TIFFClose (image); return NULL; } imageOffset += result; } /* Deal with photometric interpretations */ if (TIFFGetField (image, TIFFTAG_PHOTOMETRIC, &photo) == 0) { /* we can't know if black is black or white :-( */ /* asume min is white */ photo = PHOTOMETRIC_MINISWHITE; return NULL; } if (photo != PHOTOMETRIC_MINISWHITE) { /* Flip bits */ for (count = 0; count < bufferSize; count++) buffer[count] = ~buffer[count]; } /* Deal with fillorder */ if (TIFFGetField (image, TIFFTAG_FILLORDER, &fillorder) == 0) { /* we can't know if bits are msb or lsb ordered :-( */ /* asume msb */ fillorder = FILLORDER_MSB2LSB; } if (fillorder != FILLORDER_MSB2LSB) { /* We need to swap bits -- ABCDEFGH becomes HGFEDCBA */ for (count = 0; count < bufferSize; count++) { tempbyte = 0; if (buffer[count] & 128) tempbyte += 1; if (buffer[count] & 64) tempbyte += 2; if (buffer[count] & 32) tempbyte += 4; if (buffer[count] & 16) tempbyte += 8; if (buffer[count] & 8) tempbyte += 16; if (buffer[count] & 4) tempbyte += 32; if (buffer[count] & 2) tempbyte += 64; if (buffer[count] & 1) tempbyte += 128; buffer[count] = tempbyte; } } /* get image width */ if (TIFFGetField (image, TIFFTAG_IMAGEWIDTH, &width) == 0) { /* we can't know image width :-( */ free (buffer); TIFFClose (image); return NULL; } /* get image height */ if (TIFFGetField (image, TIFFTAG_IMAGELENGTH, &height) == 0) { /* we can't know image height :-( */ free (buffer); TIFFClose (image); return NULL; } rowstride = width / 8; /* create the gray pixbuf */ pix = ho_pixbuf_new (1, width, height, 0); if (!pix) { free (buffer); TIFFClose (image); return NULL; } /* copy data */ for (x = 0; x < width; x++) for (y = 0; y < height; y++) ho_pixbuf_set (pix, x, y, 0, 255 * (1 - ((((buffer[x / 8 + y * rowstride]) & (0x80 >> (x % 8))) > 0) ? 1 : 0))); /* free buffer and close file */ free (buffer); TIFFClose (image); return pix; } #endif /* USE_TIFF */ #ifdef USE_TIFF int ho_pixbuf_bw_tiff_save (const ho_pixbuf * pix, const char *filename) { ho_bitmap *m = NULL; /* create a bitmap */ m = ho_pixbuf_to_bitmap (pix, 0); if (!m) return TRUE; /* save bitmap */ ho_bitmap_tiff_save (m, filename); /* free bitmap */ ho_bitmap_free (m); return FALSE; } #endif /* USE_TIFF */ libhocr-0.10.17/src/ho_string.h0000644000175000017500000000461711017002614013157 00000000000000 /*************************************************************************** * ho_string.h * * Sat Dec 10 21:00:29 2005 * Copyright 2005 Yacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_string.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_STRING_H #define HO_STRING_H 1 /** @struct ho_string @brief libhocr string struct */ typedef struct { char *string; int size; int allocated_size; } ho_string; /** @brief creats a new ho_string struct @return pointer to a newly allocate ho_string or null. */ ho_string *ho_string_new (); /** @brief free a hocr_text_buffer struct from memory @param s_str pointer to ho_string struct. @return 1 */ int ho_string_free (ho_string * s_str); /** @brief add a string to hocr_text_buffer struct @param s_str pointer to hocr_text_buffer struct. @param text pointer to the string to be added to the buffer. @return new size of text */ int ho_string_cat (ho_string * s_str, const char *text); /** @brief set a string to ho_string struct @param s_str pointer to hocr_text_buffer struct. @param text pointer to the string to be set to the buffer. @return new size of text */ int ho_string_set (ho_string * s_str, const char *text); /** @brief get the string of ho_string struct @param s_str pointer to hocr_text_buffer struct. @return pointer to a newly allocated string (use free to free it) */ char * ho_string_get (const ho_string * s_str); /** @brief copy ho_string struct @param s_str pointer to hocr_text_buffer struct. @return new ho_string */ ho_string *ho_string_copy (const ho_string * s_str); #endif /* HO_STRING_H */ libhocr-0.10.17/src/ho_array_hist.h0000644000175000017500000000473411021231750014016 00000000000000 /*************************************************************************** * ho_array_hist.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_array_hist.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_ARRAY_HIST_H #define HO_ARRAY_HIST_H 1 #include #include #include /** @struct ho_array_hist @brief libhocr array histogram struct */ typedef struct { int size; double *data; } ho_array_hist; /** new ho_array_hist @param size the number of buckets in the histogram @return newly allocated ho_array_hist */ ho_array_hist *ho_array_hist_new (const int size); /** free an ho_array_hist @param hist pointer to an ho_array_hist @return FALSE */ int ho_array_hist_free (ho_array_hist * hist); /** calculate ho_array_hist from ho_array @param hist the histogram to init @param ar the ho_array to use @return FALSE */ unsigned char ho_array_hist_init (ho_array_hist * hist, const ho_array * ar); /** new ho_array_hist from ho_array data @param size the number of buckets in the histogram @param ar the ho_array to use @return newly allocated ho_array_hist */ ho_array_hist *ho_array_hist_new_from_array (const int size, const ho_array * ar); /** get data from a ho_array_hist @param hist pointer to a ho_array_hist @param i the bucket index @return the value of the histogram */ double ho_array_hist_get_at (const ho_array_hist * hist, int i); /** new ho_array from ho_array_hist @param hist pointer to an ho_array_hist @return newly allocated ho_array */ ho_array *ho_array_hist_to_array (const ho_array_hist * hist); #endif /* HO_ARRAY_HIST_H */ libhocr-0.10.17/src/ho_font.h0000644000175000017500000002044011017002614012607 00000000000000 /*************************************************************************** * ho_font.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_font.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_FONT_H #define HO_FONT_H 1 #include #include /** return a bitmap of the main signs in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_main_sign (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of the second object sign in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_second_object (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of holes in the bitmap @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_holes (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of horizontal bars found in the bitmap @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_hbars (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of vertical bars found in the bitmap @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_vbars (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of -45 deg. diagonals found in the bitmap @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_diagonal (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of +45 deg. diagonals found in the bitmap @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_diagonal_left (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a thinned bitmap without fixing artefacts @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_thin_naive (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a thinned bitmap and fix artefacts @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_thin (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of cross points in input image @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_cross (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of end points in input image @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_ends (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of top side picks in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_edges_top (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of big top side picks in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_edges_top_big (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of bottom side picks in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_edges_bottom (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of big bottom side picks in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_edges_bottom_big (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of left side picks in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_edges_left (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of big left side picks in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_edges_left_big (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of right side picks in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_edges_right (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of big right side picks in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_edges_right_big (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of top side notches in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_notch_top (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of bottom side notches in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_notch_bottom (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of left side notches in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_notch_left (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of right side notches in the font @param m_text pointer to the text bitmap @param m_mask pointer to the line map @return a newly allocated bitmap */ ho_bitmap *ho_font_notch_right (const ho_bitmap * m_text, const ho_bitmap * m_mask); /** return a bitmap of a filter @param m_text pointer to the text bitmap @param m_mask pointer to the line map @param filter_index the index of the filter to use @return a newly allocated bitmap */ ho_bitmap *ho_font_filter (const ho_bitmap * m_text, const ho_bitmap * m_mask, int filter_index); /** return a bitmap of a filter used on font holes @param m_text pointer to the text bitmap @param m_mask pointer to the line map @param filter_index the index of the filter to use @return a newly allocated bitmap */ ho_bitmap *ho_font_holes_filter (const ho_bitmap * m_text, const ho_bitmap * m_mask, int filter_index); /** writes font to file @param m_text ho_bitmap of main font @param m_nikud ho_bitmap of nikud @param m_mask ho_bitmap of line @param filename save as file name @return FALSE */ int ho_font_pnm_save (const ho_bitmap * m_text, const ho_bitmap * m_nikud, const ho_bitmap * m_mask, const char *filename); /** read ho_pixbuf from file @param m_text pointer to return ho_bitmap of main font @param m_nikud pointer to return ho_bitmap of nikud @param m_mask pointer to return ho_bitmap of line @param filename file name @return newly allocated ho_pixbuf */ int ho_font_pnm_load (ho_bitmap ** m_text, ho_bitmap ** m_nikud, ho_bitmap ** m_mask, const char *filename); #endif /* HO_FONT_H */ libhocr-0.10.17/src/ho_gtk.h0000644000175000017500000000534511033632573012450 00000000000000 /*************************************************************************** * ho_gtk.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_gtk.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_GTK_H #define HO_GTK_H 1 #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** new ho_pixbuf from a gdk_pixbuf @param gdk_pix the pixbuf to copy @return newly allocated ho_pixbuf */ ho_pixbuf *ho_gtk_pixbuf_from_gdk (const GdkPixbuf * gdk_pix); /** new ho_pixbuf from a gdk_pixbuf @param gdk_pix the pixbuf to share data with @return newly allocated ho_pixbuf, share data with gtk pixbuf */ ho_pixbuf *ho_gtk_pixbuf_from_gdk_share_data (const GdkPixbuf * gdk_pix); /** new gdk_pixbuf from a ho_pixbuf @param hocr_pix the pixbuf to copy @return newly allocated gdk_pixbuf */ GdkPixbuf *ho_gtk_pixbuf_to_gdk (const ho_pixbuf * hocr_pix); /** read ho_pixbuf from file @param filename file name @return newly allocated ho_pixbuf */ ho_pixbuf *ho_gtk_pixbuf_load (const char *filename); /** writes ho_pixbuf to file @param pix ho_pixbuf 8 or 24 bpp @param filename save as file name @param ext file type extention, e.g jpeg, png ... @return FALSE */ int ho_gtk_pixbuf_save (const ho_pixbuf * pix, const char *filename, const char *ext); /** writes font to file @param m_text ho_bitmap of main font @param m_nikud ho_bitmap of nikud @param m_mask ho_bitmap of line @param filename save as file name @param ext file type extention, e.g jpeg, png ... @return FALSE */ int ho_gtk_font_save (const ho_bitmap * m_text, const ho_bitmap * m_nikud, const ho_bitmap * m_mask, const char *filename, const char *ext); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* HO_GTK_H */ libhocr-0.10.17/src/hocr.h0000644000175000017500000001453411044117657012133 00000000000000 /*************************************************************************** * hocr.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @mainpage libhocr * * @ref README @ref HACKING @ref ChangeLog * * LIBrary for Hebrew Optical Character Recognition * * http://hocr.berlios.de * * @section README * @include README * * @section HACKING * @include HACKING * * @section ChangeLog * @include ChangeLog * */ /** @file hocr.h @brief libhocr main C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HOCR_H #define HOCR_H 1 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* color image map */ #include /* gray array (double) */ #include #include #include /* binary image map */ #include #include /* object image map */ #include /* layout container for hocr segmentations */ #include #include #include /* font recognition */ #include #include #include /* linguistics */ #include /* specific font recognition */ /* string utilities */ #include /* wrapper function */ /** convert a gray pixbuf to bitmap @param pix_in the input ho_pixbuf @param scale the scale to use @param no_auto_scale do not try to autoscale @param rotate the rotation angle to use @param no_auto_rotate do not try to autorotate @param adaptive what type of thresholding to use. 0-normal,1-no,2-fine. @param threshold the threshold to use 0..100 (0-auto) @param a_threshold the threshold to use for adaptive thresholding 0..100 (0-auto) @param progress a progress indicator 0..100 @return newly allocated gray ho_bitmap */ ho_bitmap *hocr_image_processing (const ho_pixbuf * pix_in, const unsigned char scale, const unsigned char no_auto_scale, double rotate, const unsigned char no_auto_rotate, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, int *progress); /** new ho_layout @param m_in a pointer to a text bitmap @param font_spacing_code -3 tight .. 0 .. 3 spaced @param paragraph_setup free text blocks or boxed in columns @param slicing_threshold percent of line fill to cut fonts @param slicing_width what is a wide font @param dir true-ltr false-rtl @param progress a progress indicator 0..100 @return a newly allocated and filled layout */ ho_layout *hocr_layout_analysis (const ho_bitmap * m_in, const int font_spacing_code, const int paragraph_setup, const int slicing_threshold, const int slicing_width, const int line_leeway, const unsigned char dir_ltr, int *progress); /** fill a text buffer with fonts recognized from a page layout @param l_page the page layout to recognize @param s_text_out the text buffer to fill @param html output format is html @param font_code code for the font to use @param nikud recognize nikud in image @param progress a progress indicator 0..100 @return FALSE */ int hocr_font_recognition (const ho_layout * l_page, ho_string * s_text_out, const unsigned char html, int font_code, const unsigned char nikud, unsigned char do_linguistics, int *progress); /** do ocr on a pixbuf @param pix_in the input ho_pixbuf @param s_text_out the text buffer to fill @param scale the scale to use @param no_auto_scale do not try to autoscale @param rotate the rotation angle to use @param no_auto_rotate do not try to autorotate @param adaptive what type of thresholding to use. 0-normal,1-no,2-fine. @param threshold the threshold to use 0..100 (0-auto) @param a_threshold the threshold to use for adaptive thresholding 0..100 (0-auto) @param m_in a pointer to a text bitmap @param font_spacing_code -3 tight .. 0 .. 3 spaced @param paragraph_setup free text blocks or boxed in columns @param slicing_threshold percent of line fill to cut fonts @param slicing_width what is a wide font @param dir true-ltr false-rtl @param html output format is html @param font_code code for the font to use @param nikud recognize nikud in image @param progress a progress indicator 0..100 @return FALSE */ int hocr_do_ocr_fine (const ho_pixbuf * pix_in, ho_string * s_text_out, const unsigned char scale, const unsigned char no_auto_scale, double rotate, const unsigned char no_auto_rotate, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, const int font_spacing_code, const int paragraph_setup, const int slicing_threshold, const int slicing_width, const int line_leeway, const unsigned char dir_ltr, const unsigned char html, int font_code, const unsigned char nikud, const unsigned char do_linguistics, int *progress); /** do ocr on a pixbuf, using default values @param pix_in the input ho_pixbuf @param s_text_out the text buffer to fill @param html output format is html @param font_code code for the font to use @param progress a progress indicator 0..100 @return FALSE */ int hocr_do_ocr (const ho_pixbuf * pix_in, ho_string * s_text_out, const unsigned char html, int font_code, const unsigned char do_linguistics, int *progress); /** return the build string @return build string */ const char *hocr_get_build_string (); /** return the version string @return version string */ const char *hocr_get_version_string (); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* HOCR_H */ libhocr-0.10.17/src/hocrpp.h0000644000175000017500000003707711044142545012474 00000000000000 /*************************************************************************** * hocrpp.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007, 2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file hocrpp.h @brief libhocr main C++ language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HOCRPP_H #define HOCRPP_H #include /** @brief the libhocr namespace. namespace for Hebrew Optical Character Recognition */ namespace hocr { /** @brief Hocr class. class for Hebrew Optical Character Recognition */ class Hocr; /** @brief Hocr class. class for Hebrew Optical Character Recognition */ class Hocr { public: /** @brief Hocr constructor. */ Hocr (ho_pixbuf * m_in = NULL) { /* set pixbuf */ m_pix_orig = m_in; /* lock free pointers */ m_bit_bw = NULL; page_layout = NULL; text_out = NULL; /* set defaults */ scale = 0; no_auto_scale = 0; rotate = 0; no_auto_rotate = 0; adaptive = 0; threshold = 0; a_threshold = 0; dir_ltr = 0; font_spacing_code = 0; paragraph_setup = 0; slicing_threshold = 0; slicing_width = 0; line_leeway = 0; font_code = 0; html = 0; nikud = 1; do_linguistics = 0; /* init progress */ progress = 0; } /** @brief Hocr destructor. */ ~Hocr () { if (m_pix_orig) ho_pixbuf_free (m_pix_orig); if (m_bit_bw) ho_bitmap_free (m_bit_bw); if (page_layout) ho_layout_free (page_layout); if (text_out) ho_string_free (text_out); } /** @brief set pixbuf @param m_in the pixbuf to use @return 0 */ int set_pixbuf (ho_pixbuf * m_in) { /* free existing data if present */ if (m_pix_orig) ho_pixbuf_free (m_pix_orig); if (m_bit_bw) ho_bitmap_free (m_bit_bw); if (page_layout) ho_layout_free (page_layout); if (text_out) ho_string_free (text_out); /* create a new data based on the new image */ m_pix_orig = m_in; m_bit_bw = NULL; page_layout = NULL; text_out = NULL; progress = 0; return 0; } /** @brief set b/w bitmap @param m_in the b/w bitmap to use @return 0 */ int set_bitmap (ho_bitmap * m_in) { /* free existing data if present */ if (m_pix_orig) ho_pixbuf_free (m_pix_orig); if (m_bit_bw) ho_bitmap_free (m_bit_bw); if (page_layout) ho_layout_free (page_layout); if (text_out) ho_string_free (text_out); /* create a new data based on the new image */ m_pix_orig = NULL; m_bit_bw = m_in; page_layout = NULL; text_out = NULL; progress = 0; return 0; } /** @brief get pixbuf @return the object pixbuf */ ho_pixbuf *get_pixbuf () { return m_pix_orig; } /** @brief get bitmap @return the object bitmap */ ho_bitmap *get_bitmap () { return m_bit_bw; } /** @brief save bitmap as pnm @param filename the the image file name @return the object bitmap */ int save_bitmap_as_pnm (const char *filename) { return ho_bitmap_pnm_save (m_bit_bw, filename); } /** @brief save bitmap as tiff (neads a tiff enabled libhocr) @param filename the the image file name @return the object bitmap */ int save_bitmap_as_tiff (const char *filename) { return ho_bitmap_tiff_save (m_bit_bw, filename); } /** @brief get bitmap pixbuf @return a pixbuf of the object bitmap */ ho_pixbuf *get_bitmap_pixbuf () { ho_pixbuf *m_pix_tmp = NULL; ho_pixbuf *m_pix_out = NULL; if (!m_bit_bw) return NULL; m_pix_tmp = ho_pixbuf_new_from_bitmap (m_bit_bw); if (!m_pix_tmp) return NULL; m_pix_out = ho_pixbuf_to_rgb (m_pix_tmp); ho_pixbuf_free (m_pix_tmp); return m_pix_out; } /** @brief get layout pixbuf @return a pixbuf of the object layout */ ho_pixbuf *get_layout_pixbuf () { ho_pixbuf *m_pix_out = NULL; /* check if we have a layout and text */ if (!page_layout || !m_bit_bw) return NULL; /* * m_pix_out = ho_pixbuf_new_from_layout (layout, show_grid, text_bitmap, * block_frame_red, block_frame_green, block_frame_blue, block_frame_alfa, * block_frame_width, line_frame_red, line_frame_green, line_frame_blue, * line_frame_alfa, line_frame_width, word_frame_red, word_frame_green, * word_frame_blue, word_frame_alfa, word_frame_width, font_frame_red, * font_frame_green, font_frame_blue, font_frame_alfa, font_frame_width); */ m_pix_out = ho_pixbuf_new_from_layout (page_layout, 0, m_bit_bw, 0, 0, 255, 150, 5, 255, 0, 0, 255, 5, 255, 240, 0, 180, 255, 0, 250, 0, 235, 255); return m_pix_out; } /** @brief get text @return the recognized text */ const char *get_text () { /* do we have text ? */ if (!text_out) return NULL; return text_out->string; } /** @brief get progress of ocr @return the progress 0..100 */ int get_progress () { return progress; } /** @brief do image processing @return 0 */ int do_image_processing () { if (!m_pix_orig) return 1; if (m_bit_bw) { ho_bitmap_free (m_bit_bw); m_bit_bw = NULL; } m_bit_bw = hocr_image_processing (m_pix_orig, scale, no_auto_scale, rotate, no_auto_rotate, adaptive, threshold, a_threshold, &progress); return 0; } /** @brief do bitmap closing @return 0 */ int do_bitmap_closing () { ho_bitmap * m_bit_temp = NULL; if (!m_bit_bw) return 1; m_bit_temp = ho_bitmap_closing (m_bit_bw); if (!m_bit_temp) return 1; ho_bitmap_free (m_bit_bw); m_bit_bw = m_bit_temp; return 0; } /** @brief do bitmap opening @return 0 */ int do_bitmap_opening () { ho_bitmap * m_bit_temp = NULL; if (!m_bit_bw) return 1; m_bit_temp = ho_bitmap_opening (m_bit_bw); if (!m_bit_temp) return 1; ho_bitmap_free (m_bit_bw); m_bit_bw = m_bit_temp; return 0; } /** @brief do bitmap erosion @return 0 */ int do_bitmap_erosion () { ho_bitmap * m_bit_temp = NULL; if (!m_bit_bw) return 1; m_bit_temp = ho_bitmap_erosion (m_bit_bw); if (!m_bit_temp) return 1; ho_bitmap_free (m_bit_bw); m_bit_bw = m_bit_temp; return 0; } /** @brief do bitmap dilation @return 0 */ int do_bitmap_dilation () { ho_bitmap * m_bit_temp = NULL; if (!m_bit_bw) return 1; m_bit_temp = ho_bitmap_dilation (m_bit_bw); if (!m_bit_temp) return 1; ho_bitmap_free (m_bit_bw); m_bit_bw = m_bit_temp; return 0; } /** @brief do layout analysis @return 0 */ int do_layout_analysis () { if (!m_bit_bw) return 1; if (page_layout) { ho_layout_free (page_layout); page_layout = NULL; } page_layout = hocr_layout_analysis (m_bit_bw, font_spacing_code, paragraph_setup, slicing_threshold, slicing_width, line_leeway, dir_ltr, &progress); return 0; } /** @brief do font recognition @return 0 */ int do_font_recognition () { if (!page_layout) return 1; if (text_out) { ho_string_free (text_out); text_out = NULL; } text_out = ho_string_new (); hocr_font_recognition (page_layout, text_out, html, font_code, nikud, do_linguistics, &progress); return 0; } /** @brief do ocr @return 0 */ int do_ocr () { /* do all ocr stages */ do_image_processing (); do_layout_analysis (); do_font_recognition (); return 0; } /** @brief get html param @return FALSE-no html in output, TRUE-output html text */ int get_html () { return html; } /** @brief set html param @param html_in new value of html param @return FALSE-no html in output, TRUE-output html text */ int set_html (const unsigned char html_in) { html = html_in; return html; } /** @brief get font param @return font code of objct */ int get_font () { return font_code; } /** @brief set font param @param font_in new value of font param @return font code of objct */ int set_font (const int font_in) { font_code = font_in; return font_code; } /** @brief get nikud param @return nikud of objct */ unsigned char get_nikud () { return nikud; } /** @brief set nikud param @param nikud_in new value of nikud param @return nikud of objct */ unsigned char set_nikud (const unsigned char nikud_in) { nikud = nikud_in; return nikud; } /** @brief set dir_ltr param @param dir_ltr_in new value of dir_ltr param @return dir_ltr of objct */ unsigned char set_dir_ltr (const unsigned char dir_ltr_in) { dir_ltr = dir_ltr_in; return dir_ltr; } /** @brief set scale param @param scale_in new value of scale param @return scale of objct */ unsigned char set_scale (const unsigned char scale_in) { scale = scale_in; no_auto_scale = 1; return scale; } /** @brief set auto_scale param @return no_auto_scale of objct */ unsigned char set_auto_scale () { no_auto_scale = 0; return no_auto_scale; } /** @brief set adaptive param @param adaptive_in new value of adaptive param @return adaptive of objct */ unsigned char set_adaptive (const unsigned char adaptive_in) { adaptive = adaptive_in; return adaptive; } /** @brief set threshold param @param threshold_in new value of threshold param @return threshold of objct */ unsigned char set_threshold (const unsigned char threshold_in) { threshold = threshold_in; return threshold; } /** @brief set a_threshold param @param a_threshold_in new value of a_threshold param @return a_threshold of objct */ unsigned char set_a_threshold (const unsigned char a_threshold_in) { a_threshold = a_threshold_in; return a_threshold; } /** @brief get font_spacing_code param @return font_spacing_code of objct */ int get_font_spacing_code () { return font_spacing_code; } /** @brief set font_spacing_code param @param font_spacing_code_in new value of font_spacing_code param @return font_spacing_code of objct */ int set_font_spacing_code (const int font_spacing_code_in) { font_spacing_code = font_spacing_code_in; return font_spacing_code; } /** @brief get slicing_width param @return slicing_width of objct */ int get_slicing_width () { return slicing_width; } /** @brief set slicing_width param @param slicing_width_in new value of slicing_width param @return slicing_width of objct */ int set_slicing_width (const int slicing_width_in) { slicing_width = slicing_width_in; return slicing_width; } /** @brief get slicing_threshold param @return slicing_threshold of objct */ int get_slicing_threshold () { return slicing_threshold; } /** @brief set slicing_threshold param @param slicing_threshold_in new value of slicing_threshold param @return slicing_threshold of objct */ int set_slicing_threshold (const int slicing_threshold_in) { slicing_threshold = slicing_threshold_in; return slicing_threshold; } /** @brief set line_leeway param @param line_leeway_in new value of line_leeway param @return line_leeway of objct */ int set_line_leeway (const int line_leeway_in) { line_leeway = line_leeway_in; return line_leeway; } /** @brief set no_auto_rotate @param no_auto_rotate_in new value of font_spacing_code param @return no_auto_rotate of objct */ unsigned char set_no_auto_rotate (const unsigned char no_auto_rotate_in) { no_auto_rotate = no_auto_rotate_in; return no_auto_rotate; } /** @brief set do_linguistics @param do_linguistics_in new value of do_linguistics param @return do_linguistics of objct */ unsigned char set_do_linguistics (const unsigned char do_linguistics_in) { do_linguistics = do_linguistics_in; return do_linguistics; } /** @brief get paragraph setup param @return paragraph setup */ int get_paragraph_setup () { return paragraph_setup; } /** @brief set paragraph setup param @param paragraph_setup_in new value of font param @return paragraph setup of objct */ int set_paragraph_setup (const int paragraph_setup_in) { paragraph_setup = paragraph_setup_in; return paragraph_setup; } /** @brief get build string @return build string */ const char *get_build_string () { return hocr_get_build_string (); } int progress; // this is public private: ho_pixbuf * m_pix_orig; ho_bitmap *m_bit_bw; ho_layout *page_layout; ho_string *text_out; unsigned char scale; unsigned char no_auto_scale; double rotate; unsigned char no_auto_rotate; unsigned char adaptive; unsigned char threshold; unsigned char a_threshold; unsigned char dir_ltr; int font_spacing_code; int paragraph_setup; int slicing_threshold; int slicing_width; int line_leeway; unsigned char nikud; unsigned char do_linguistics; int font_code; unsigned char html; }; // class } // name space #endif /* HOCRPP_H */ libhocr-0.10.17/src/ho_bitmap_hist.c0000644000175000017500000000640011027673002014145 00000000000000 /*************************************************************************** * ho_bitmap_hist.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifdef USE_TIFF #include #endif #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_bitmap_hist.h" ho_bitmap_hist * ho_bitmap_hist_new (const int width, const int height) { ho_bitmap_hist *m_new = NULL; /* * allocate memory for pixbuf */ m_new = (ho_bitmap_hist *) malloc (sizeof (ho_bitmap_hist)); if (!m_new) { return NULL; } /* * read header */ m_new->fill = 0; m_new->max_x = 0; m_new->max_y = 0; m_new->max_x_index = 0; m_new->max_y_index = 0; m_new->width = width; m_new->height = height; /* * allocate memory for data (and set to zero) */ m_new->data_x = calloc (m_new->width, sizeof (unsigned int)); if (!(m_new->data_x)) { free (m_new); return NULL; } m_new->data_y = calloc (m_new->height, sizeof (unsigned int)); if (!(m_new->data_y)) { free (m_new->data_x); free (m_new); return NULL; } return m_new; } int ho_bitmap_hist_free (ho_bitmap_hist * m) { if (!m) return TRUE; if (m->data_x) free (m->data_x); if (m->data_y) free (m->data_y); free (m); return FALSE; } int ho_bitmap_hist_update(ho_bitmap_hist * hist, const ho_bitmap * m) { int x, y; /* sanity check */ if (!hist || !m) return TRUE; /* check width and hight */ if (hist->width != m->width || hist->height != m->height) return TRUE; hist->fill = 0; hist->max_x = 0; hist->max_y = 0; hist->max_x_index = 0; hist->max_y_index = 0; /* clean hist */ for (x = 0; x < hist->width; x++) (hist->data_x)[x] = 0; for (y = 0; y < hist->height; y++) (hist->data_y)[y] = 0; /* fill hist */ for (x = 0; x < hist->width; x++) for (y = 0; y < hist->height; y++) { /* is this pixel black ? */ if (ho_bitmap_get(m,x,y)) { (hist->fill)++; (hist->data_x)[x]++; (hist->data_y)[y]++; if ((hist->data_x)[x] > hist->max_x) { hist->max_x = (hist->data_x)[x]; hist->max_x_index = x; } if ((hist->data_y)[y] > hist->max_y) { hist->max_y = (hist->data_y)[y]; hist->max_y_index = y; } } } return FALSE; } libhocr-0.10.17/src/ho_linguistics.c0000644000175000017500000000405111042566155014206 00000000000000 /*************************************************************************** * ho_linguistics.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_linguistics.h" int ho_linguistics_adjust_array_out (double *array_out, unsigned char word_end, unsigned char word_start, int last_char_i) { int i; const double factor = 0.3; if (word_end) { /* not otiuyt sofiyut */ /* caf */ array_out[11] -= factor; /* mem */ array_out[14] -= factor; /* nun */ array_out[16] -= factor; /* pe */ array_out[20] -= factor; /* tzadik */ array_out[22] -= factor; } else { /* sofiyut */ /* caf */ array_out[12] -= factor; /* mem */ array_out[15] -= factor; /* nun */ array_out[17] -= factor; /* pe */ array_out[21] -= factor; /* tzadik */ array_out[23] -= factor; /* simaney pisuk */ array_out[28] -= factor; array_out[29] -= factor; array_out[32] -= factor; array_out[23] -= factor; array_out[34] -= factor; array_out[35] -= factor; } return FALSE; } libhocr-0.10.17/src/ho_segment.c0000644000175000017500000004637011051626130013313 00000000000000 /*************************************************************************** * ho_segment.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_segment.h" ho_bitmap * ho_segment_paragraphs_fine (const ho_bitmap * m, const unsigned char box, const double font_height_factor_min, const double font_height_factor_max, const double font_width_factor_min, const double font_width_factor_max, const double horizontal_link_factor, const double vertical_link_factor) { ho_bitmap *m_clean; ho_bitmap *m_temp1; ho_bitmap *m_out; /* take only "regular" fonts */ m_clean = ho_bitmap_filter_by_size (m, (double) (m->font_height) * font_height_factor_min, (double) (m->font_height) * font_height_factor_max, (double) (m->font_width) * font_width_factor_min, (double) (m->font_width) * font_width_factor_max); if (!m_clean) return NULL; /* link paragraphs */ m_temp1 = ho_bitmap_vlink (m_clean, m->line_spacing * vertical_link_factor); if (!m_temp1) return NULL; m_out = ho_bitmap_hlink (m_temp1, m->font_width * horizontal_link_factor); if (!m_out) return NULL; ho_bitmap_free (m_temp1); if (box > 0 && box < 255) m_temp1 = ho_bitmap_filter_boxes (m_out, 0, 0); else if (box == 255) m_temp1 = ho_bitmap_filter_fill (m_out); else m_temp1 = ho_bitmap_filter_fill (m_out); ho_bitmap_free (m_out); ho_bitmap_free (m_clean); /* try and link one/two line broken paragraphs (free paragraphs need more * care) */ m_out = ho_bitmap_filter_hlink (m_temp1, m->font_width * 6, m->font_height * 2 + m->line_spacing * 2); ho_bitmap_free (m_temp1); /* check all paragraphs for artefacts, too small or large */ m_temp1 = ho_bitmap_filter_by_size (m_out, 2 * m->font_height / 3, m->height, m->font_width * 3, m->width); ho_bitmap_free (m_out); m_out = m_temp1; return m_out; } ho_bitmap * ho_segment_paragraphs (const ho_bitmap * m, const unsigned char box) { ho_bitmap *m_out; double font_height_factor_min = 0.25; double font_height_factor_max = 4.0; double font_width_factor_min = 0.25; double font_width_factor_max = 5.0; double horizontal_link_factor = 2.0; double vertical_link_factor = 1.2; /* if nikud we need to be more careful */ if (m->nikud) { font_height_factor_min = 0.5; font_height_factor_max = 4.0; font_width_factor_min = 1.0 / 3.0; font_width_factor_max = 5.0; } /* if only one column we can be more agresive when linking horizontaly */ if (box == 1) { horizontal_link_factor = 6.0; vertical_link_factor = 1.2; } /* if we want "free" page setup, evry line is a different paragraph and we can recognize more font sizes */ if (box == 255) { horizontal_link_factor = 1.5; vertical_link_factor = 0.8; } m_out = ho_segment_paragraphs_fine (m, box, font_height_factor_min, font_height_factor_max, font_width_factor_min, font_width_factor_max, horizontal_link_factor, vertical_link_factor); return m_out; } ho_bitmap * ho_segment_lines_fine (const ho_bitmap * m, const double font_height_factor_min, const double font_height_factor_max, const double font_width_factor_min, const double font_width_factor_max, const double link_arg, const double link_arg_2, const double extend_arg, const double extend_arg_2, const double erode_arg) { int i; ho_bitmap *m_clean; ho_bitmap *m_temp; ho_bitmap *m_out; /* set the font dimentions info in the paragrap text matrix */ ho_dimentions_font_width_height_nikud (m, 12, 350, 12, 350); m_clean = ho_bitmap_filter_by_size (m, (double) (m->font_height) * font_height_factor_min, (double) (m->font_height) * font_height_factor_max, (double) (m->font_width) * font_width_factor_min, (double) (m->font_width) * font_width_factor_max); if (!m_clean) return NULL; /* link lines */ m_temp = ho_bitmap_hlink (m_clean, m->font_width * link_arg); if (!m_temp) return NULL; m_out = m_temp; /* add sideways leeway */ for (i = 0; i < 1; i++) { /* add sideways leeway */ m_temp = ho_bitmap_filter_obj_extend_lateraly (m_out, m->font_width * extend_arg); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; m_temp = ho_bitmap_hlink (m_out, m->font_width * link_arg); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; } /* set out matrix height, we want clean lines of known height */ m_temp = ho_bitmap_filter_set_height (m_out, m->font_height, 0, 0); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* remove little things up and down the line */ m_temp = ho_bitmap_herode (m_out, m->font_width * erode_arg); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* set out matrix height, we want clean lines of known height */ m_temp = ho_bitmap_filter_set_height (m_out, m->font_height, 0, 0); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; for (i = 0; i < 6; i++) { m_temp = ho_bitmap_hlink (m_out, m->font_width * link_arg); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* add sideways leeway */ m_temp = ho_bitmap_filter_obj_extend_lateraly (m_out, m->font_width * extend_arg_2); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; } /* set out matrix height, we want clean lines of known height */ m_temp = ho_bitmap_filter_set_height (m_out, m->font_height, 0, 0); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* check for fonts that are outside the line */ ho_bitmap_or (m_out, m_clean); /* link fonts that are autside line */ m_temp = ho_bitmap_hlink (m_out, m->font_width * link_arg); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* add sideways leeway */ m_temp = ho_bitmap_filter_obj_extend_lateraly (m_out, m->font_width * extend_arg_2); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* remove little things up and down the line */ m_temp = ho_bitmap_herode (m_out, m->font_width * erode_arg); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* set out matrix height, we want clean lines of known height */ m_temp = ho_bitmap_filter_set_height (m_out, m->font_height, 0, 0); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; ho_bitmap_free (m_clean); return m_out; } ho_bitmap * ho_segment_lines (const ho_bitmap * m) { ho_bitmap *m_out; double font_height_factor_min = 8.0 / 10.0; double font_height_factor_max = 12.0 / 10.0; double font_width_factor_min = 1.0 / 3.0; double font_width_factor_max = 5.0; double link_arg = 3.0; double link_arg_2 = 6.0; double extend_arg = 1.2; double extend_arg_2 = 3.0; double erode_arg = 5.0; /* check for one word lines */ if (m->width < (m->font_width * erode_arg)) erode_arg = 1; /* if not nikud we can include smaller fonts as "regular" */ if (!(m->nikud)) { font_height_factor_min = 7.0 / 10.0; font_height_factor_max = 12.0 / 10.0; font_width_factor_min = 1.0 / 5.0; font_width_factor_max = 5.0; } m_out = ho_segment_lines_fine (m, font_height_factor_min, font_height_factor_max, font_width_factor_min, font_width_factor_max, link_arg, link_arg_2, extend_arg, extend_arg_2, erode_arg); return m_out; } ho_bitmap * ho_segment_words_fine (const ho_bitmap * m, const ho_bitmap * m_line_map, const double horizontal_link_factor, const double top_frame_factor, const double bottom_frame_factor) { ho_bitmap *m_temp = NULL; ho_bitmap *m_out = NULL; ho_bitmap *m_temp_line_map = NULL; int i; int x, y; int width; int height; int line_height; int font_spacing; unsigned char nikud_ret; /* check for extreem font spacing */ if (m->font_spacing == 0) font_spacing = m->font_width / 4 + 1; else if (m->font_spacing == 255) font_spacing = m->font_width; else font_spacing = m->font_spacing; /* get line_height */ x = m_line_map->width / 2; for (y = 0; y < m_line_map->height && !ho_bitmap_get (m_line_map, x, y); y++) ; line_height = y; for (; y < m_line_map->height && ho_bitmap_get (m_line_map, x, y); y++) ; line_height = y - line_height; /* chop of none line thigs */ m_temp = ho_bitmap_clone (m); if (!m_temp) return NULL; /* add some lee way above and below line */ m_temp_line_map = ho_bitmap_set_height (m_line_map, line_height, line_height / 4, line_height / 4); if (m_temp_line_map) { ho_bitmap_and (m_temp, m_temp_line_map); ho_bitmap_free (m_temp_line_map); } else { ho_bitmap_and (m_temp, m_line_map); } m_out = m_temp; /* get font boxes */ m_temp = ho_bitmap_set_height (m_out, line_height * 2, line_height, line_height); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; ho_bitmap_and (m_out, m_line_map); /* try to link words */ m_temp = ho_bitmap_hlink (m_out, (double) font_spacing * horizontal_link_factor); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* get font boxes */ m_temp = ho_bitmap_set_height (m_out, line_height * 2, line_height, line_height); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; ho_bitmap_and (m_out, m_line_map); m_temp = ho_bitmap_set_height (m_out, line_height, (double) line_height * top_frame_factor, (double) line_height * bottom_frame_factor); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* set position in m_text */ m_out->x = m->x; m_out->y = m->y; return m_out; } ho_bitmap * ho_segment_words (const ho_bitmap * m, const ho_bitmap * m_line_map, const char font_spacing_code) { ho_bitmap *m_out = NULL; double horizontal_link_factor = 9.0 / 5.0; double top_frame_factor = 0.4; double bottom_frame_factor = 1.1; /* if no nikud we do not need lots of bottom frame */ if (!(m->nikud)) { bottom_frame_factor = 1.0; } /* check font spacing */ switch (font_spacing_code) { case -1: horizontal_link_factor = 6.0 / 5.0; break; case -2: horizontal_link_factor = 4.0 / 5.0; break; case -3: horizontal_link_factor = 2.0 / 5.0; break; case 1: horizontal_link_factor = 11.0 / 5.0; break; case 2: horizontal_link_factor = 16.0 / 5.0; break; case 3: horizontal_link_factor = 22.0 / 5.0; break; default: horizontal_link_factor = 8.0 / 5.0; } m_out = ho_segment_words_fine (m, m_line_map, horizontal_link_factor, top_frame_factor, bottom_frame_factor); return m_out; } ho_bitmap * ho_segment_fonts (const ho_bitmap * m, const ho_bitmap * m_line_map, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway) { ho_bitmap *m_temp; ho_bitmap *m_font; ho_bitmap *m_font_temp; ho_bitmap *m_out; ho_objmap *o_obj; int i; int x, y; int width; int height; int line_start, line_end, line_height; int lee_way; int s_threshold; int s_width; unsigned char nikud_ret; int *line_fill; int avg_line_fill = 0; /* sanity check */ if (!m->width || !m->height) return NULL; /* set default slicing_threshold */ if (slicing_threshold < 1) s_threshold = 85; else s_threshold = slicing_threshold; if (slicing_width < 1) s_width = 150; else s_width = slicing_width; /* get line_height */ x = m_line_map->width / 2; for (y = 0; y < m_line_map->height && !ho_bitmap_get (m_line_map, x, y); y++) ; line_start = y; for (; y < m_line_map->height && ho_bitmap_get (m_line_map, x, y); y++) ; line_end = y; line_height = line_end - line_start; lee_way = line_leeway * line_height / 100; if (line_start - lee_way < 0) lee_way = line_start; /* create a fill arrays */ line_fill = (int *) calloc (m->width, sizeof (int)); if (!line_fill) return NULL; for (x = 0; x < m->width; x++) for (y = line_start - lee_way; y < (line_end + lee_way) && y < m->height; y++) { line_fill[x] += ho_bitmap_get (m, x, y); avg_line_fill += ho_bitmap_get (m, x, y); } avg_line_fill /= m->width; /* make line fill % of 100 */ for (x = 0; x < m->width; x++) line_fill[x] = 100 * line_fill[x] / line_height; m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; /* check for clean spaces */ for (x = 0; x < m->width; x++) { if (line_fill[x] <= m->com_line_fill / 15) ho_bitmap_draw_vline (m_out, x, 0, m_out->height); } /* look for small overlaping */ /* chop of none line thigs */ m_temp = ho_bitmap_clone (m); if (!m_temp) return NULL; ho_bitmap_and (m_temp, m_line_map); { int font_start; int font_end; x = 0; while (x < m->width) { /* get start&end of font */ for (; x < m->width && ho_bitmap_get (m_out, x, 1); x++) ; font_start = x; for (; x < m->width && !ho_bitmap_get (m_out, x, 1); x++) ; font_end = x; { /* get the font bitmap */ m_font = ho_bitmap_clone_window (m_temp, font_start, 0, font_end - font_start, m->height); /* look only for large objects that can be complete fonts */ m_font_temp = ho_bitmap_filter_by_size (m_font, m->font_height / 4, 2 * m->font_height, m->font_width / 5, 3 * m->font_width); o_obj = ho_objmap_new_from_bitmap (m_font_temp); ho_bitmap_free (m_font_temp); ho_objmap_sort_by_reading_index (o_obj, 255, FALSE); /* check for two or more objects */ if (ho_objmap_get_size (o_obj) > 1) { /* search for little overlaping object */ for (i = 0; i < ho_objmap_get_size (o_obj) - 1; i++) { int i1, i2; int this_object_end; int next_object_start; int thin_object_width; int overlaping; int x1, x2; x1 = ho_objmap_get_object (o_obj, i).x + ho_objmap_get_object (o_obj, i).width / 2; x2 = ho_objmap_get_object (o_obj, i + 1).x + ho_objmap_get_object (o_obj, i + 1).width / 2; /* recheck objects order */ if (x2 < x1) { i1 = i; i2 = i + 1; } else { i2 = i; i1 = i + 1; } thin_object_width = ho_objmap_get_object (o_obj, i1).width; if (thin_object_width > ho_objmap_get_object (o_obj, i2).width) thin_object_width = ho_objmap_get_object (o_obj, i2).width; this_object_end = ho_objmap_get_object (o_obj, i1).x; next_object_start = ho_objmap_get_object (o_obj, i2).x + ho_objmap_get_object (o_obj, i2).width; overlaping = next_object_start - this_object_end; /* check overlaping */ if (overlaping >= 0 && overlaping < thin_object_width / 2) { /* draw lines at the objects egjes */ ho_bitmap_draw_vline (m_out, ho_objmap_get_object (o_obj, i1).x + font_start, 0, m_out->height); } } } ho_objmap_free (o_obj); ho_bitmap_free (m_font); } } } /* look for linked fonts, and try to break them using force */ { int font_start; int font_end; x = 0; while (x < m->width) { /* get start&end of font */ for (; x < m->width && ho_bitmap_get (m_out, x, 2); x++) ; font_start = x; for (; x < m->width && !ho_bitmap_get (m_out, x, 2); x++) ; font_end = x; /* if this is a wide font, try to break it using force */ if ((font_end - font_start) > s_width * (m->font_width) / 100) { /* get the font bitmap */ m_font = ho_bitmap_clone_window (m_temp, font_start, 0, font_end - font_start, m->height); o_obj = ho_objmap_new_from_bitmap (m_font); ho_bitmap_free (m_font); /* check that it is not a long _ or - 's */ if (!(ho_objmap_get_size (o_obj) < 1 && ho_objmap_get_object (o_obj, 0).height < m->font_height / 3)) { /* if this is not a very wide font be careful */ if ((font_end - font_start) < 2 * s_width * (m->font_width) / 100) { for (i = (font_start + 1); i < font_end; i++) { if (line_fill[i] <= s_threshold * avg_line_fill / 100) { ho_bitmap_draw_vline (m_out, i, 0, m_out->height); } } } /* if this is a very wide font be more agresive */ else { for (i = (font_start + 1); i < font_end; i++) { if (line_fill[i] <= s_threshold * avg_line_fill / 70) { ho_bitmap_draw_vline (m_out, i, 0, m_out->height); } } } } ho_objmap_free (o_obj); } } } ho_bitmap_free (m_temp); /* thin interfont lines to one line per font */ m_temp = ho_bitmap_new (m->width, m->height); if (!m_temp) return NULL; { int min_x; int min_x_start; int width = m->width; x = 1; while (x < width) { /* get start&end of font */ min_x = x - 1; for (; x < width && !ho_bitmap_get (m_out, x, 2); x++) ; /* if this is not a real font close gap */ if ((double)(x - min_x) < ((double)m->font_width / 6.0)) for (;min_x <= x; min_x++) ho_bitmap_draw_vline (m_temp, min_x, 0, m_out->height); /* get start&end of interfont line */ for (; x < width && !ho_bitmap_get (m_out, x, 2); x++) ; min_x = x - 1; min_x_start = min_x; for (; x < width && ho_bitmap_get (m_out, x, 2); x++) { if (line_fill[min_x] >= line_fill[x]) min_x = x; if (line_fill[min_x_start] > line_fill[x]) min_x_start = x; } /* draw line on minimal interfont space */ for (i = min_x_start; i <= min_x && i < width - 1; i++) ho_bitmap_draw_vline (m_temp, i, 0, m_out->height); } } /* set position in m_text */ m_temp->x = m->x; m_temp->y = m->y; ho_bitmap_free (m_out); free (line_fill); return m_temp; } libhocr-0.10.17/src/ho_recognize.c0000644000175000017500000025417011051622173013640 00000000000000 /*************************************************************************** * ho_recognize.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" #include "fonts/ho_recognize_font_1.h" #include "fonts/ho_recognize_font_2.h" #include "fonts/ho_recognize_font_3.h" #include "fonts/ho_recognize_font_4.h" #include "fonts/ho_recognize_font_5.h" #include "fonts/ho_recognize_font_6.h" #include "ho_recognize.h" int ho_recognize_array_in_size () { return HO_ARRAY_IN_SIZE; } int ho_recognize_array_out_size () { return HO_ARRAY_OUT_SIZE; } int ho_recognize_dimentions (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *height, double *width, double *top, double *bottom, double *top_left, double *top_mid, double *top_right, double *mid_left, double *mid_right, double *bottom_left, double *bottom_mid, double *bottom_right, double *has_two_hlines_up, double *has_two_hlines_down, double *has_three_hlines_up, double *has_three_hlines_down) { int sum, x, y; int font_start; int font_end; int font_height; int line_start; int line_end; int line_height; ho_bitmap *m_clean = NULL; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_start = y - 1; sum = 0; for (y = m_mask->height - 4; y > font_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_end = y + 1; font_height = font_end - font_start; if (!font_height || !line_height) return TRUE; *height = (double) font_height / (double) line_height; *width = (double) (m_text->width) / (double) line_height; *top = (double) (line_start - font_start) / (double) line_height; *bottom = (double) (line_end - font_end) / (double) line_height; /* check if font is not just a little off line */ if (*top < 0.025 && *top > -0.025) { /* regular size */ if (*height < 1.025 && *height > 0.975) { *top = *bottom = 0.0; } /* short and high font */ else { *bottom -= *top; *top = 0.0; } } else if (*bottom < 0.025 && *bottom > -0.025) { *top -= *bottom; *bottom = 0.0; } /* all values are 0..1 */ *height = *height / 2.0; if (*height > 1.0) *height = 1.0; *width = *width / 2.0; if (*width > 1.0) *width = 1.0; *top = (*top + 1.0) / 2.0; if (*top > 1.0) *top = 1.0; if (*top < 0.0) *top = 0.0; *bottom = (*bottom + 1.0) / 2.0; if (*bottom > 1.0) *bottom = 1.0; if (*bottom < 0.0) *bottom = 0.0; /* get font egdes */ for (y = font_start, x = 0; x < m_mask->width / 2 && y < (font_start + font_height / 2) && !ho_bitmap_get (m_text, x, y); x++, y++) ; *top_left = (double) x / (double) (m_mask->width / 2); if (*top_left > 1.0) *top_left = 1.0; for (y = font_end, x = 0; x < m_mask->width / 2 && y > (font_start + font_height / 2) && !ho_bitmap_get (m_text, x, y); x++, y--) ; *bottom_left = (double) x / (double) (m_mask->width / 2); if (*bottom_left > 1.0) *bottom_left = 1.0; for (y = font_start, x = m_text->width - 1; x > m_mask->width / 2 && y < (font_start + font_height / 2) && !ho_bitmap_get (m_text, x, y); x--, y++) ; *top_right = (double) (m_mask->width - x) / (double) (m_mask->width / 2); if (*top_right > 1.0) *top_right = 1.0; for (y = font_end, x = m_text->width - 1; x > m_mask->width / 2 && y > (font_start + font_height / 2) && !ho_bitmap_get (m_text, x, y); x--, y--) ; *bottom_right = (double) (m_mask->width - x) / (double) (m_mask->width / 2); if (*bottom_right > 1.0) *bottom_right = 1.0; for (y = font_start, x = m_text->width / 2; y < (font_start + font_height / 2) && !ho_bitmap_get (m_text, x, y); y++) ; *top_mid = (double) (y - font_start) / (double) (font_height / 2); if (*top_mid > 1.0) *top_mid = 1.0; for (y = font_end, x = m_text->width / 2; y > (font_start + font_height / 2) && !ho_bitmap_get (m_text, x, y); y--) ; *bottom_mid = (double) (font_end - y) / (double) (font_height / 2); if (*bottom_mid > 1.0) *bottom_mid = 1.0; for (y = font_start + font_height / 2, x = 0; x < (m_text->width / 2) && !ho_bitmap_get (m_text, x, y); x++) ; *mid_left = (double) (x) / (double) (m_text->width / 2); if (*mid_left > 1.0) *mid_left = 1.0; for (y = font_start + font_height / 2, x = m_text->width - 1; x > (m_text->width / 2) && !ho_bitmap_get (m_text, x, y); x--) ; *mid_right = (double) (m_text->width - x) / (double) (m_text->width / 2); if (*mid_right > 1.0) *mid_right = 1.0; m_clean = ho_bitmap_dilation_n (m_text, 6); *has_two_hlines_up = 0.0; *has_three_hlines_up = 0.0; sum = 0; y = font_start + font_height / 4; x = 0; while (x < m_text->width) { for (; x < m_text->width, !ho_bitmap_get (m_clean, x, y); x++) ; if (ho_bitmap_get (m_clean, x, y) && x < m_text->width) sum++; for (; x < m_text->width, ho_bitmap_get (m_clean, x, y); x++) ; } if (sum == 2) *has_two_hlines_up = 1.0; else if (sum == 3) *has_three_hlines_up = 1.0; *has_two_hlines_down = 0.0; *has_three_hlines_down = 0.0; sum = 0; y = font_start + 3 * font_height / 4; x = 0; while (x < m_text->width) { for (; x < m_text->width, !ho_bitmap_get (m_clean, x, y); x++) ; if (ho_bitmap_get (m_text, x, y) && x < m_text->width) sum++; for (; x < m_text->width, ho_bitmap_get (m_clean, x, y); x++) ; } if (sum == 2) *has_two_hlines_down = 1.0; else if (sum == 3) *has_three_hlines_down = 1.0; ho_bitmap_free (m_clean); return FALSE; } int ho_recognize_bars (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_bar, double *has_mid_hbar, double *has_bottom_bar, double *has_left_bar, double *has_mid_vbar, double *has_right_bar, double *has_diagonal_bar, double *has_diagonal_left_bar) { int sum, x, y; int font_start; int font_end; int font_height; int line_start; int line_end; int line_height; ho_bitmap *m_bars = NULL; *has_top_bar = 0.0; *has_mid_hbar = 0.0; *has_bottom_bar = 0.0; *has_left_bar = 0.0; *has_mid_vbar = 0.0; *has_right_bar = 0.0; *has_diagonal_bar = 0.0; *has_diagonal_left_bar = 0.0; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_start = y - 1; sum = 0; for (y = m_mask->height - 4; y > font_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_end = y + 1; font_height = font_end - font_start; if (!font_height || !line_height) return TRUE; /* get horizontal bars */ m_bars = ho_font_hbars (m_text, m_mask); if (!m_bars) return TRUE; /* look for a horizontal line in bitmap */ x = m_bars->width / 2; for (y = font_start; y < font_end; y++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if ((y - font_start) < font_height / 3) *has_top_bar = 1.0; else if ((y - font_start) < 2 * font_height / 3) *has_mid_hbar = 1.0; else *has_bottom_bar = 1.0; /* get out of the line */ y++; for (; y < font_end && ho_bitmap_get (m_bars, x, y); y++) ; } } /* get vertical bars */ ho_bitmap_free (m_bars); m_bars = ho_font_vbars (m_text, m_mask); if (!m_bars) return TRUE; /* look for a vertical line in bitmap */ y = m_bars->height / 2; for (x = 0; x < m_bars->width; x++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if (x < m_bars->width / 3) *has_left_bar = 1.0; else if (x < 2 * m_bars->width / 3) *has_mid_vbar = 1.0; else *has_right_bar = 1.0; /* get out of the line */ x++; for (; x < m_bars->width && ho_bitmap_get (m_bars, x, y); x++) ; } } /* get diagonals */ ho_bitmap_free (m_bars); m_bars = ho_font_diagonal (m_text, m_mask); if (!m_bars) return TRUE; /* look for a bar in left 1/4 of font */ y = m_bars->height / 2; for (x = 0; x < m_bars->width && !ho_bitmap_get (m_bars, x, y); x++) ; if (ho_bitmap_get (m_bars, x, y) && x < m_bars->width) *has_diagonal_bar = 1.0; /* get diagonals */ ho_bitmap_free (m_bars); m_bars = ho_font_diagonal_left (m_text, m_mask); if (!m_bars) return TRUE; /* look for a bar in left 1/4 of font */ y = m_bars->height / 2; for (x = 0; x < m_bars->width && !ho_bitmap_get (m_bars, x, y); x++) ; if (ho_bitmap_get (m_bars, x, y) && x < m_bars->width) *has_diagonal_left_bar = 1.0; ho_bitmap_free (m_bars); return FALSE; } int ho_recognize_edges (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_edge, double *has_mid_left_edge, double *has_bottom_left_edge, double *has_top_right_edge, double *has_mid_right_edge, double *has_bottom_right_edge, double *has_left_top_edge, double *has_mid_top_edge, double *has_right_top_edge, double *has_left_bottom_edge, double *has_mid_bottom_edge, double *has_right_bottom_edge) { int sum, x, y; int font_start; int font_end; int font_height; int line_start; int line_end; int line_height; ho_bitmap *m_bars = NULL; *has_top_left_edge = 0.0; *has_mid_left_edge = 0.0; *has_bottom_left_edge = 0.0; *has_top_right_edge = 0.0; *has_mid_right_edge = 0.0; *has_bottom_right_edge = 0.0; *has_left_top_edge = 0.0; *has_mid_top_edge = 0.0; *has_right_top_edge = 0.0; *has_left_bottom_edge = 0.0; *has_mid_bottom_edge = 0.0; *has_right_bottom_edge = 0.0; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_start = y - 1; sum = 0; for (y = m_mask->height - 4; y > font_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_end = y + 1; font_height = font_end - font_start; if (!font_height || !line_height) return TRUE; /* get horizontal left egdes */ m_bars = ho_font_edges_left (m_text, m_mask); if (!m_bars) return TRUE; /* look for a horizontal line in bitmap */ x = m_bars->width / 2; for (y = font_start; y < font_end; y++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if ((y - font_start) < font_height / 3) *has_top_left_edge += 0.1; else if ((y - font_start) < 2 * font_height / 3) *has_mid_left_edge += 0.1; else *has_bottom_left_edge += 0.1; /* get out of the line */ y++; for (; y < font_end && ho_bitmap_get (m_bars, x, y); y++) ; } } /* get horizontal right edges */ ho_bitmap_free (m_bars); m_bars = ho_font_edges_right (m_text, m_mask); if (!m_bars) return TRUE; /* look for a horizontal line in bitmap */ x = m_bars->width / 2; for (y = font_start; y < font_end; y++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if ((y - font_start) < font_height / 3) *has_top_right_edge += 0.1; else if ((y - font_start) < (2 * font_height / 3)) *has_mid_right_edge += 0.1; else *has_bottom_right_edge += 0.1; /* get out of the line */ y++; for (; y < font_end && ho_bitmap_get (m_bars, x, y); y++) ; } } ho_bitmap_free (m_bars); m_bars = ho_font_edges_top (m_text, m_mask); if (!m_bars) return TRUE; /* look for a vertical line in bitmap */ y = m_bars->height / 2; for (x = 0; x < m_bars->width; x++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if (x < m_bars->width / 3) *has_left_top_edge += 0.1; else if (x < (2 * m_bars->width / 3)) *has_mid_top_edge += 0.1; else *has_right_top_edge += 0.1; /* get out of the line */ x++; for (; x < m_bars->width && ho_bitmap_get (m_bars, x, y); x++) ; } } /* get horizontal right edges */ ho_bitmap_free (m_bars); m_bars = ho_font_edges_bottom (m_text, m_mask); if (!m_bars) return TRUE; /* look for a vertical line in bitmap */ y = m_bars->height / 2; for (x = 0; x < m_bars->width; x++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if (x < m_bars->width / 3) *has_left_bottom_edge += 0.1; else if (x < (2 * m_bars->width / 3)) *has_mid_bottom_edge += 0.1; else *has_right_bottom_edge += 0.1; /* get out of the line */ x++; for (; x < m_bars->width && ho_bitmap_get (m_bars, x, y); x++) ; } } ho_bitmap_free (m_bars); return FALSE; } int ho_recognize_edges_big (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_edge, double *has_mid_left_edge, double *has_bottom_left_edge, double *has_top_right_edge, double *has_mid_right_edge, double *has_bottom_right_edge, double *has_left_top_edge, double *has_mid_top_edge, double *has_right_top_edge, double *has_left_bottom_edge, double *has_mid_bottom_edge, double *has_right_bottom_edge) { int sum, x, y; int font_start; int font_end; int font_height; int line_start; int line_end; int line_height; ho_bitmap *m_bars = NULL; *has_top_left_edge = 0.0; *has_mid_left_edge = 0.0; *has_bottom_left_edge = 0.0; *has_top_right_edge = 0.0; *has_mid_right_edge = 0.0; *has_bottom_right_edge = 0.0; *has_left_top_edge = 0.0; *has_mid_top_edge = 0.0; *has_right_top_edge = 0.0; *has_left_bottom_edge = 0.0; *has_mid_bottom_edge = 0.0; *has_right_bottom_edge = 0.0; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_start = y - 1; sum = 0; for (y = m_mask->height - 4; y > font_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_end = y + 1; font_height = font_end - font_start; if (!font_height || !line_height) return TRUE; /* get horizontal left egdes */ m_bars = ho_font_edges_left_big (m_text, m_mask); if (!m_bars) return TRUE; /* look for a horizontal line in bitmap */ x = m_bars->width / 2; for (y = font_start; y < font_end; y++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if ((y - font_start) < font_height / 3) *has_top_left_edge += 0.1; else if ((y - font_start) < 2 * font_height / 3) *has_mid_left_edge += 0.1; else *has_bottom_left_edge += 0.1; /* get out of the line */ y++; for (; y < font_end && ho_bitmap_get (m_bars, x, y); y++) ; } } /* get horizontal right edges */ ho_bitmap_free (m_bars); m_bars = ho_font_edges_right_big (m_text, m_mask); if (!m_bars) return TRUE; /* look for a horizontal line in bitmap */ x = m_bars->width / 2; for (y = font_start; y < font_end; y++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if ((y - font_start) < font_height / 3) *has_top_right_edge += 0.1; else if ((y - font_start) < 2 * font_height / 3) *has_mid_right_edge += 0.1; else *has_bottom_right_edge += 0.1; /* get out of the line */ y++; for (; y < font_end && ho_bitmap_get (m_bars, x, y); y++) ; } } ho_bitmap_free (m_bars); m_bars = ho_font_edges_top_big (m_text, m_mask); if (!m_bars) return TRUE; /* look for a vertical line in bitmap */ y = m_bars->height / 2; for (x = 0; x < m_bars->width; x++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if (x < m_bars->width / 3) *has_left_top_edge += 0.1; else if (x < (2 * m_bars->width / 3)) *has_mid_top_edge += 0.1; else *has_right_top_edge += 0.1; /* get out of the line */ x++; for (; x < m_bars->width && ho_bitmap_get (m_bars, x, y); x++) ; } } /* get horizontal right edges */ ho_bitmap_free (m_bars); m_bars = ho_font_edges_bottom_big (m_text, m_mask); if (!m_bars) return TRUE; /* look for a vertical line in bitmap */ y = m_bars->height / 2; for (x = 0; x < m_bars->width; x++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if (x < m_bars->width / 3) *has_left_bottom_edge += 0.1; else if (x < (2 * m_bars->width / 3)) *has_mid_bottom_edge += 0.1; else *has_right_bottom_edge += 0.1; /* get out of the line */ x++; for (; x < m_bars->width && ho_bitmap_get (m_bars, x, y); x++) ; } } ho_bitmap_free (m_bars); return FALSE; } int ho_recognize_notches (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_notch, double *has_mid_left_notch, double *has_bottom_left_notch, double *has_top_right_notch, double *has_mid_right_notch, double *has_bottom_right_notch, double *has_left_top_notch, double *has_mid_top_notch, double *has_right_top_notch, double *has_left_bottom_notch, double *has_mid_bottom_notch, double *has_right_bottom_notch) { int sum, x, y; int font_start; int font_end; int font_height; int line_start; int line_end; int line_height; ho_bitmap *m_bars = NULL; *has_top_left_notch = 0.0; *has_mid_left_notch = 0.0; *has_bottom_left_notch = 0.0; *has_top_right_notch = 0.0; *has_mid_right_notch = 0.0; *has_bottom_right_notch = 0.0; *has_left_top_notch = 0.0; *has_mid_top_notch = 0.0; *has_right_top_notch = 0.0; *has_left_bottom_notch = 0.0; *has_mid_bottom_notch = 0.0; *has_right_bottom_notch = 0.0; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_start = y - 1; sum = 0; for (y = m_mask->height - 4; y > font_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_end = y + 1; font_height = font_end - font_start; if (!font_height || !line_height) return TRUE; /* get horizontal left notches */ m_bars = ho_font_notch_left (m_text, m_mask); if (!m_bars) return TRUE; x = m_bars->width / 2; for (y = font_start; y < font_end; y++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if ((y - font_start) < font_height / 3) *has_top_left_notch += 0.1; else if ((y - font_start) < 2 * font_height / 3) *has_mid_left_notch += 0.1; else *has_bottom_left_notch += 0.1; /* get out of the line */ y++; for (; y < font_end && ho_bitmap_get (m_bars, x, y); y++) ; } } /* get horizontal right edges */ ho_bitmap_free (m_bars); m_bars = ho_font_notch_right (m_text, m_mask); if (!m_bars) return TRUE; x = m_bars->width / 2; for (y = font_start; y < font_end; y++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if ((y - font_start) < font_height / 3) *has_top_right_notch += 0.1; else if ((y - font_start) < 2 * font_height / 3) *has_mid_right_notch += 0.1; else *has_bottom_right_notch += 0.1; /* get out of the line */ y++; for (; y < font_end && ho_bitmap_get (m_bars, x, y); y++) ; } } ho_bitmap_free (m_bars); m_bars = ho_font_notch_top (m_text, m_mask); if (!m_bars) return TRUE; /* look for a vertical line in bitmap */ y = m_bars->height / 2; for (x = 0; x < m_bars->width; x++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if (x < m_bars->width / 3) *has_left_top_notch += 0.1; else if (x < (2 * m_bars->width / 3)) *has_mid_top_notch += 0.1; else *has_right_top_notch += 0.1; /* get out of the line */ x++; for (; x < m_bars->width && ho_bitmap_get (m_bars, x, y); x++) ; } } /* get horizontal right edges */ ho_bitmap_free (m_bars); m_bars = ho_font_notch_bottom (m_text, m_mask); if (!m_bars) return TRUE; /* look for a vertical line in bitmap */ y = m_bars->height / 2; for (x = 0; x < m_bars->width; x++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if (x < m_bars->width / 3) *has_left_bottom_notch += 0.1; else if (x < (2 * m_bars->width / 3)) *has_mid_bottom_notch += 0.1; else *has_right_bottom_notch += 0.1; /* get out of the line */ x++; for (; x < m_bars->width && ho_bitmap_get (m_bars, x, y); x++) ; } } ho_bitmap_free (m_bars); return FALSE; } int ho_recognize_parts (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_one_hole, double *has_two_holes, double *has_hey_part, double *has_dot_part, double *has_comma_part) { int sum, x, y; int font_start; int font_end; int font_height; int line_start; int line_end; int line_height; int parts_start; int parts_end; int parts_height; ho_bitmap *m_parts = NULL; *has_one_hole = 0.0; *has_two_holes = 0.0; *has_hey_part = 0.0; *has_dot_part = 0.0; *has_comma_part = 0.0; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_start = y - 1; sum = 0; for (y = m_mask->height - 4; y > font_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_end = y + 1; font_height = font_end - font_start; if (!font_height || !line_height) return TRUE; /* holes */ m_parts = ho_font_holes (m_text, m_mask); if (m_parts) { sum = ho_bitmap_filter_count_objects (m_parts); if (sum == 1) *has_one_hole = 1.0; else if (sum == 2) *has_two_holes = 1.0; } /* hey and kuf part */ if (m_parts) ho_bitmap_free (m_parts); m_parts = ho_font_second_object (m_text, m_mask); if (m_parts) { /* get font start and end */ sum = 0; for (y = 0; y < m_parts->height && sum == 0; y++) for (sum = 0, x = 0; x < m_parts->width; x++) sum += ho_bitmap_get (m_parts, x, y); parts_start = y - 1; sum = 0; for (y = m_parts->height - 4; y > parts_start && sum == 0; y--) for (sum = 0, x = 0; x < m_parts->width; x++) sum += ho_bitmap_get (m_parts, x, y); parts_end = y + 1; parts_height = parts_end - parts_start; /* hey part */ y = font_end - font_height / 5; for (x = 0; x < m_parts->width / 2 && !ho_bitmap_get (m_parts, x, y); x++) ; /* part is in left side of font */ if (x < m_parts->width / 2) { for (; x < m_parts->width / 2 && ho_bitmap_get (m_parts, x, y); x++) ; /* part ends in left side of font */ if (x < m_parts->width / 2 && parts_height > font_height / 4 && parts_start > (font_start + font_height / 5)) *has_hey_part = 1.0; } /* dot part */ /* part is in middle bottom of font */ if (parts_start > font_start + font_height / 2 && parts_height < font_height / 2 && parts_height > font_height / 6) *has_dot_part = 1.0; /* comma part */ /* part is in middle bottom of font */ if (parts_start > font_start + font_height / 2 && parts_height > font_height / 5) *has_comma_part = 1.0; } if (m_parts) ho_bitmap_free (m_parts); return FALSE; } int ho_recognize_ends (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_end, double *has_top_mid_end, double *has_top_right_end, double *has_mid_left_end, double *has_mid_mid_end, double *has_mid_right_end, double *has_bottom_left_end, double *has_bottom_mid_end, double *has_bottom_right_end, double *has_top_left_cross, double *has_top_mid_cross, double *has_top_right_cross, double *has_mid_left_cross, double *has_mid_mid_cross, double *has_mid_right_cross, double *has_bottom_left_cross, double *has_bottom_mid_cross, double *has_bottom_right_cross) { int sum, x, y; int font_start; int font_end; int font_height; int line_start; int line_end; int line_height; ho_bitmap *m_parts = NULL; /* init values */ *has_top_left_end = 0.0; *has_top_mid_end = 0.0; *has_top_right_end = 0.0; *has_mid_left_end = 0.0; *has_mid_mid_end = 0.0; *has_mid_right_end = 0.0; *has_bottom_left_end = 0.0; *has_bottom_mid_end = 0.0; *has_bottom_right_end = 0.0; *has_top_left_cross = 0.0; *has_top_mid_cross = 0.0; *has_top_right_cross = 0.0; *has_mid_left_cross = 0.0; *has_mid_mid_cross = 0.0; *has_mid_right_cross = 0.0; *has_bottom_left_cross = 0.0; *has_bottom_mid_cross = 0.0; *has_bottom_right_cross = 0.0; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_start = y - 1; sum = 0; for (y = m_mask->height - 4; y > font_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); font_end = y + 1; if (font_start < 1) font_start = 1; font_height = font_end - font_start; if (!font_height || !line_height) return TRUE; /* ends */ m_parts = ho_font_ends (m_text, m_mask); if (!m_parts) return TRUE; /* top left */ sum = 0; for (x = 0; x < m_parts->width / 3; x++) for (y = font_start - 1; y < font_start + font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_top_left_end = sum * 0.1; /* top mid */ sum = 0; for (x = m_parts->width / 3; x < 2 * m_parts->width / 3; x++) for (y = font_start - 1; y < font_start + font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_top_mid_end = sum * 0.1; /* top right */ sum = 0; for (x = 2 * m_parts->width / 3; x < m_parts->width; x++) for (y = font_start - 1; y < font_start + font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_top_right_end = sum * 0.1; /* mid left */ sum = 0; for (x = 0; x < m_parts->width / 3; x++) for (y = font_start + font_height / 3; y < font_start + 2 * font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_mid_left_end = sum * 0.1; /* mid mid */ sum = 0; for (x = m_parts->width / 3; x < 2 * m_parts->width / 3; x++) for (y = font_start + font_height / 3; y < font_start + 2 * font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_mid_mid_end = sum * 0.1; /* mid right */ sum = 0; for (x = 2 * m_parts->width / 3; x < m_parts->width; x++) for (y = font_start + font_height / 3; y < font_start + 2 * font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_mid_right_end = sum * 0.1; /* bottom left */ sum = 0; for (x = 0; x < m_parts->width / 3; x++) for (y = font_start + 2 * font_height / 3; y < font_start + font_height; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_bottom_left_end = sum * 0.1; /* bottom mid */ sum = 0; for (x = m_parts->width / 3; x < 2 * m_parts->width / 3; x++) for (y = font_start + 2 * font_height / 3; y < font_start + font_height; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_bottom_mid_end = sum * 0.1; /* bottom right */ sum = 0; for (x = 2 * m_parts->width / 3; x < m_parts->width; x++) for (y = font_start + 2 * font_height / 3; y < font_start + font_height; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_bottom_right_end = sum * 0.1; /* crosses */ ho_bitmap_free (m_parts); m_parts = ho_font_cross (m_text, m_mask); if (!m_parts) return TRUE; /* top left */ sum = 0; for (x = 0; x < m_parts->width / 3; x++) for (y = font_start - 1; y < font_start + font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_top_left_cross = sum * 0.1; /* top mid */ sum = 0; for (x = m_parts->width / 3; x < 2 * m_parts->width / 3; x++) for (y = font_start - 1; y < font_start + font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_top_mid_cross = sum * 0.1; /* top right */ sum = 0; for (x = 2 * m_parts->width / 3; x < m_parts->width; x++) for (y = font_start; y < font_start + font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_top_right_cross = sum * 0.1; /* mid left */ sum = 0; for (x = 0; x < m_parts->width / 3; x++) for (y = font_start + font_height / 3; y < font_start + 2 * font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_mid_left_cross = sum * 0.1; /* mid mid */ sum = 0; for (x = m_parts->width / 3; x < 2 * m_parts->width / 3; x++) for (y = font_start + font_height / 3; y < font_start + 2 * font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_mid_mid_cross = sum * 0.1; /* mid right */ sum = 0; for (x = 2 * m_parts->width / 3; x < m_parts->width; x++) for (y = font_start + font_height / 3; y < font_start + 2 * font_height / 3; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_mid_right_cross = sum * 0.1; /* bottom left */ sum = 0; for (x = 0; x < m_parts->width / 3; x++) for (y = font_start + 2 * font_height / 3; y < font_start + font_height; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_bottom_left_cross = sum * 0.1; /* bottom mid */ sum = 0; for (x = m_parts->width / 3; x < 2 * m_parts->width / 3; x++) for (y = font_start + 2 * font_height / 3; y < font_start + font_height; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_bottom_mid_cross = sum * 0.1; /* bottom right */ sum = 0; for (x = 2 * m_parts->width / 3; x < m_parts->width; x++) for (y = font_start + 2 * font_height / 3; y < font_start + font_height; y++, sum += ho_bitmap_get (m_parts, x, y)) ; *has_bottom_right_cross = sum * 0.1; ho_bitmap_free (m_parts); return FALSE; } int ho_recognize_holes_dimentions (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *height, double *width, double *top, double *bottom, double *top_left, double *top_right, double *bottom_left, double *bottom_right) { int sum, x, y; int font_start; int font_end; int font_height; int font_start_x; int font_end_x; int font_width; int line_start; int line_end; int line_height; ho_bitmap *m_holes = NULL; *height = 0.0; *width = 0.0; *top = 0.0; *bottom = 0.0; *top_left = 0.0; *top_right = 0.0; *bottom_left = 0.0; *bottom_right = 0.0; m_holes = ho_font_holes (m_text, m_mask); if (!m_holes) return TRUE; sum = ho_bitmap_filter_count_objects (m_holes); if (sum > 2 || sum < 1) return TRUE; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_holes, x, y); font_start = y - 1; sum = 0; for (y = m_mask->height - 4; y > font_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_holes, x, y); font_end = y + 1; font_height = font_end - font_start; if (!font_height || !line_height) return TRUE; sum = 0; for (x = 0; x < m_mask->width && sum == 0; x++) for (sum = 0, y = font_start; y < font_end; y++) sum += ho_bitmap_get (m_holes, x, y); font_start_x = x - 1; sum = 0; for (x = m_mask->width - 1; x > font_start_x && sum == 0; x--) for (sum = 0, y = font_start; y < font_end; y++) sum += ho_bitmap_get (m_holes, x, y); font_end_x = x + 1; font_width = font_end_x - font_start_x; if (!font_width) return TRUE; *height = (double) font_height / (double) line_height; *width = (double) font_width / (double) line_height; *top = (double) (line_start - font_start) / (double) line_height; *bottom = (double) (line_end - font_end) / (double) line_height; /* check if font is not just a little off line */ if (*top < 0.1 && *top > -0.1) { /* regular size */ if (*height < 1.1 && *height > 0.9) { *top = *bottom = 0.0; } /* short and high font */ else { *bottom -= *top; *top = 0.0; } } else if (*bottom < 0.1 && *bottom > -0.1) { *top -= *bottom; *bottom = 0.0; } /* all values are 0..1 */ *height = *height / 2.0; if (*height > 1.0) *height = 1.0; *width = *width / 2.0; if (*width > 1.0) *width = 1.0; *top = (*top + 1.0) / 2.0; if (*top > 1.0) *top = 1.0; if (*top < 0.0) *top = 0.0; *bottom = (*bottom + 1.0) / 2.0; if (*bottom > 1.0) *bottom = 1.0; if (*bottom < 0.0) *bottom = 0.0; /* get font egdes */ for (y = font_start, x = font_start_x; x < (font_start_x + font_width / 2) && y < (font_start + font_height / 2) && !ho_bitmap_get (m_holes, x, y); x++, y++) ; *top_left = (double) (x - font_start_x) / (double) (font_width / 2); if (*top_left > 1.0) *top_left = 1.0; for (y = font_end, x = font_start_x; x < (font_start_x + font_width / 2) && y > (font_start + font_height / 2) && !ho_bitmap_get (m_holes, x, y); x++, y--) ; *bottom_left = (double) (x - font_start_x) / (double) (font_width / 2); if (*bottom_left > 1.0) *bottom_left = 1.0; for (y = font_start, x = font_end_x; x > (font_start_x + font_width / 2) && y < (font_start + font_height / 2) && !ho_bitmap_get (m_holes, x, y); x--, y++) ; *top_right = (double) (font_end_x - x) / (double) (font_width / 2); if (*top_right > 1.0) *top_right = 1.0; for (y = font_end, x = font_end_x; x > (font_start_x + font_width / 2) && y > (font_start + font_height / 2) && !ho_bitmap_get (m_holes, x, y); x--, y--) ; *bottom_right = (double) (font_end_x - x) / (double) (font_width / 2); if (*bottom_right > 1.0) *bottom_right = 1.0; return FALSE; } int ho_recognize_holes_edges (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_edge, double *has_mid_left_edge, double *has_bottom_left_edge, double *has_top_right_edge, double *has_mid_right_edge, double *has_bottom_right_edge, double *has_left_top_edge, double *has_mid_top_edge, double *has_right_top_edge, double *has_left_bottom_edge, double *has_mid_bottom_edge, double *has_right_bottom_edge) { int sum, x, y; int font_start; int font_end; int font_height; int font_start_x; int font_end_x; int font_width; int line_start; int line_end; int line_height; ho_bitmap *m_bars = NULL; ho_bitmap *m_holes = NULL; *has_top_left_edge = 0.0; *has_mid_left_edge = 0.0; *has_bottom_left_edge = 0.0; *has_top_right_edge = 0.0; *has_mid_right_edge = 0.0; *has_bottom_right_edge = 0.0; *has_left_top_edge = 0.0; *has_mid_top_edge = 0.0; *has_right_top_edge = 0.0; *has_left_bottom_edge = 0.0; *has_mid_bottom_edge = 0.0; *has_right_bottom_edge = 0.0; m_holes = ho_font_holes (m_text, m_mask); if (!m_holes) return TRUE; sum = ho_bitmap_filter_count_objects (m_holes); if (sum > 2 || sum < 1) return TRUE; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_holes, x, y); font_start = y - 1; sum = 0; for (y = m_mask->height - 4; y > font_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_holes, x, y); font_end = y + 1; font_height = font_end - font_start; if (!font_height || !line_height) return TRUE; sum = 0; for (x = 0; x < m_mask->width && sum == 0; x++) for (sum = 0, y = font_start; y < font_end; y++) sum += ho_bitmap_get (m_holes, x, y); font_start_x = x - 1; sum = 0; for (x = m_mask->width - 1; x > font_start_x && sum == 0; x--) for (sum = 0, y = font_start; y < font_end; y++) sum += ho_bitmap_get (m_holes, x, y); font_end_x = x + 1; font_width = font_end_x - font_start_x; if (!font_width) return TRUE; /* get horizontal left egdes */ m_bars = ho_font_edges_left (m_holes, m_mask); if (!m_bars) return TRUE; /* look for a horizontal line in bitmap */ x = m_bars->width / 2; for (y = font_start; y < font_end; y++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if ((y - font_start) < font_height / 3) *has_top_left_edge = 1.0; else if ((y - font_start) < 2 * font_height / 3) *has_mid_left_edge = 1.0; else *has_bottom_left_edge = 1.0; /* get out of the line */ y++; for (; y < font_end && ho_bitmap_get (m_bars, x, y); y++) ; } } /* get horizontal right edges */ ho_bitmap_free (m_bars); m_bars = ho_font_edges_right (m_holes, m_mask); if (!m_bars) return TRUE; /* look for a horizontal line in bitmap */ x = m_bars->width / 2; for (y = font_start; y < font_end; y++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if ((y - font_start) < font_height / 3) *has_top_right_edge = 1.0; else if ((y - font_start) < 2 * font_height / 3) *has_mid_right_edge = 1.0; else *has_bottom_right_edge = 1.0; /* get out of the line */ y++; for (; y < font_end && ho_bitmap_get (m_bars, x, y); y++) ; } } ho_bitmap_free (m_bars); m_bars = ho_font_edges_top (m_holes, m_mask); if (!m_bars) return TRUE; /* look for a vertical line in bitmap */ y = m_bars->height / 2; for (x = 0; x < m_bars->width; x++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if (x < m_bars->width / 3) *has_left_top_edge = 1.0; else if (x < (2 * m_bars->width / 3)) *has_mid_top_edge = 1.0; else *has_right_top_edge = 1.0; /* get out of the line */ x++; for (; x < m_bars->width && ho_bitmap_get (m_bars, x, y); x++) ; } } /* get horizontal right edges */ ho_bitmap_free (m_bars); m_bars = ho_font_edges_bottom (m_holes, m_mask); if (!m_bars) return TRUE; /* look for a vertical line in bitmap */ y = m_bars->height / 2; for (x = 0; x < m_bars->width; x++) { /* find a line */ if (ho_bitmap_get (m_bars, x, y)) { /* where are we in fonts */ if (x < m_bars->width / 3) *has_left_bottom_edge = 1.0; else if (x < (2 * m_bars->width / 3)) *has_mid_bottom_edge = 1.0; else *has_right_bottom_edge = 1.0; /* get out of the line */ x++; for (; x < m_bars->width && ho_bitmap_get (m_bars, x, y); x++) ; } } ho_bitmap_free (m_bars); return FALSE; } int ho_recognize_create_array_in (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *array_in) { int i; double height; double width; double top; double bottom; double top_left; double top_mid; double top_right; double bottom_left; double bottom_mid; double bottom_right; double mid_left; double mid_right; double has_two_hlines_up; double has_two_hlines_down; double has_three_hlines_up; double has_three_hlines_down; double has_top_bar; double has_mid_hbar; double has_bottom_bar; double has_left_bar; double has_mid_vbar; double has_right_bar; double has_diagonal_bar; double has_diagonal_left_bar; double has_top_left_edge; double has_mid_left_edge; double has_bottom_left_edge; double has_top_right_edge; double has_mid_right_edge; double has_bottom_right_edge; double has_left_top_edge; double has_mid_top_edge; double has_right_top_edge; double has_left_bottom_edge; double has_mid_bottom_edge; double has_right_bottom_edge; double has_top_left_notch; double has_mid_left_notch; double has_bottom_left_notch; double has_top_right_notch; double has_mid_right_notch; double has_bottom_right_notch; double has_left_top_notch; double has_mid_top_notch; double has_right_top_notch; double has_left_bottom_notch; double has_mid_bottom_notch; double has_right_bottom_notch; double has_one_hole; double has_two_holes; double has_hey_part; double has_dot_part; double has_comma_part; double has_top_left_end; double has_top_mid_end; double has_top_right_end; double has_mid_left_end; double has_mid_mid_end; double has_mid_right_end; double has_bottom_left_end; double has_bottom_mid_end; double has_bottom_right_end; double has_top_left_cross; double has_top_mid_cross; double has_top_right_cross; double has_mid_left_cross; double has_mid_mid_cross; double has_mid_right_cross; double has_bottom_left_cross; double has_bottom_mid_cross; double has_bottom_right_cross; /* init values to zero, if some function fails */ for (i = 0; i < HO_ARRAY_IN_SIZE; i++) array_in[i] = 0.0; /* fill array with values */ ho_recognize_dimentions (m_text, m_mask, &height, &width, &top, &bottom, &top_left, &top_mid, &top_right, &mid_left, &mid_right, &bottom_left, &bottom_mid, &bottom_right, &has_two_hlines_up, &has_two_hlines_down, &has_three_hlines_up, &has_three_hlines_down); array_in[0] = height; array_in[1] = width; array_in[2] = width / height; if (array_in[2] > 1.0) array_in[2] = 1.0; array_in[3] = top; array_in[4] = bottom; array_in[5] = top_left; array_in[6] = top_mid; array_in[7] = top_right; array_in[8] = mid_left; array_in[9] = mid_right; array_in[10] = bottom_left; array_in[11] = bottom_mid; array_in[12] = bottom_right; array_in[13] = has_two_hlines_up; array_in[14] = has_two_hlines_down; array_in[15] = has_three_hlines_up; array_in[16] = has_three_hlines_down; ho_recognize_bars (m_text, m_mask, &has_top_bar, &has_mid_hbar, &has_bottom_bar, &has_left_bar, &has_mid_vbar, &has_right_bar, &has_diagonal_bar, &has_diagonal_left_bar); array_in[17] = has_top_bar; array_in[18] = has_mid_hbar; array_in[19] = has_bottom_bar; array_in[20] = has_left_bar; array_in[21] = has_mid_vbar; array_in[22] = has_right_bar; array_in[23] = has_diagonal_bar; array_in[24] = has_diagonal_left_bar; ho_recognize_edges (m_text, m_mask, &has_top_left_edge, &has_mid_left_edge, &has_bottom_left_edge, &has_top_right_edge, &has_mid_right_edge, &has_bottom_right_edge, &has_left_top_edge, &has_mid_top_edge, &has_right_top_edge, &has_left_bottom_edge, &has_mid_bottom_edge, &has_right_bottom_edge); array_in[25] = has_top_left_edge; array_in[26] = has_mid_left_edge; array_in[27] = has_bottom_left_edge; array_in[28] = has_top_right_edge; array_in[29] = has_mid_right_edge; array_in[30] = has_bottom_right_edge; array_in[31] = has_left_top_edge; array_in[32] = has_mid_top_edge; array_in[33] = has_right_top_edge; array_in[34] = has_left_bottom_edge; array_in[35] = has_mid_bottom_edge; array_in[36] = has_right_bottom_edge; ho_recognize_notches (m_text, m_mask, &has_top_left_notch, &has_mid_left_notch, &has_bottom_left_notch, &has_top_right_notch, &has_mid_right_notch, &has_bottom_right_notch, &has_left_top_notch, &has_mid_top_notch, &has_right_top_notch, &has_left_bottom_notch, &has_mid_bottom_notch, &has_right_bottom_notch); array_in[37] = has_top_left_notch; array_in[38] = has_mid_left_notch; array_in[39] = has_bottom_left_notch; array_in[40] = has_top_right_notch; array_in[41] = has_mid_right_notch; array_in[42] = has_bottom_right_notch; array_in[43] = has_left_top_notch; array_in[44] = has_mid_top_notch; array_in[45] = has_right_top_notch; array_in[46] = has_left_bottom_notch; array_in[47] = has_mid_bottom_notch; array_in[48] = has_right_bottom_notch; ho_recognize_ends (m_text, m_mask, &has_top_left_end, &has_top_mid_end, &has_top_right_end, &has_mid_left_end, &has_mid_mid_end, &has_mid_right_end, &has_bottom_left_end, &has_bottom_mid_end, &has_bottom_right_end, &has_top_left_cross, &has_top_mid_cross, &has_top_right_cross, &has_mid_left_cross, &has_mid_mid_cross, &has_mid_right_cross, &has_bottom_left_cross, &has_bottom_mid_cross, &has_bottom_right_cross); array_in[49] = has_top_left_end; array_in[50] = has_top_mid_end; array_in[51] = has_top_right_end; array_in[52] = has_mid_left_end; array_in[53] = has_mid_mid_end; array_in[54] = has_mid_right_end; array_in[55] = has_bottom_left_end; array_in[56] = has_bottom_mid_end; array_in[57] = has_bottom_right_end; array_in[58] = has_top_left_cross; array_in[59] = has_top_mid_cross; array_in[60] = has_top_right_cross; array_in[61] = has_mid_left_cross; array_in[62] = has_mid_mid_cross; array_in[63] = has_mid_right_cross; array_in[64] = has_bottom_left_cross; array_in[65] = has_bottom_mid_cross; array_in[66] = has_bottom_right_cross; ho_recognize_parts (m_text, m_mask, &has_one_hole, &has_two_holes, &has_hey_part, &has_dot_part, &has_comma_part); array_in[67] = has_one_hole; array_in[68] = has_two_holes; array_in[69] = has_hey_part; array_in[70] = has_dot_part; array_in[71] = has_comma_part; ho_recognize_holes_edges (m_text, m_mask, &has_top_left_edge, &has_mid_left_edge, &has_bottom_left_edge, &has_top_right_edge, &has_mid_right_edge, &has_bottom_right_edge, &has_left_top_edge, &has_mid_top_edge, &has_right_top_edge, &has_left_bottom_edge, &has_mid_bottom_edge, &has_right_bottom_edge); array_in[72] = has_top_left_edge; array_in[73] = has_mid_left_edge; array_in[74] = has_bottom_left_edge; array_in[75] = has_top_right_edge; array_in[76] = has_mid_right_edge; array_in[77] = has_bottom_right_edge; array_in[78] = has_left_top_edge; array_in[79] = has_mid_top_edge; array_in[80] = has_right_top_edge; array_in[81] = has_left_bottom_edge; array_in[82] = has_mid_bottom_edge; array_in[83] = has_right_bottom_edge; ho_recognize_holes_dimentions (m_text, m_mask, &height, &width, &top, &bottom, &top_left, &top_right, &bottom_left, &bottom_right); array_in[84] = height; array_in[85] = width; array_in[86] = top; array_in[87] = bottom; array_in[88] = top_left; array_in[89] = top_right; array_in[90] = bottom_left; array_in[91] = bottom_right; ho_recognize_edges_big (m_text, m_mask, &has_top_left_edge, &has_mid_left_edge, &has_bottom_left_edge, &has_top_right_edge, &has_mid_right_edge, &has_bottom_right_edge, &has_left_top_edge, &has_mid_top_edge, &has_right_top_edge, &has_left_bottom_edge, &has_mid_bottom_edge, &has_right_bottom_edge); array_in[92] = has_top_left_edge; array_in[93] = has_mid_left_edge; array_in[94] = has_bottom_left_edge; array_in[95] = has_top_right_edge; array_in[96] = has_mid_right_edge; array_in[97] = has_bottom_right_edge; array_in[98] = has_left_top_edge; array_in[99] = has_mid_top_edge; array_in[100] = has_right_top_edge; array_in[101] = has_left_bottom_edge; array_in[102] = has_mid_bottom_edge; array_in[103] = has_right_bottom_edge; return 0; } double ho_recognize_array (const double *array_in, const int sign_index, int font_code) { double return_value; if (font_code == 0) { switch (sign_index) { case 1: /* alef */ return_value = ho_recognize_font_1_alef (array_in); break; case 2: /* bet */ return_value = ho_recognize_font_1_bet (array_in); break; case 3: /* gimal */ return_value = ho_recognize_font_1_gimal (array_in); break; case 4: /* dalet */ return_value = ho_recognize_font_1_dalet (array_in); break; case 5: /* hey */ return_value = ho_recognize_font_1_hey (array_in); break; case 6: /* vav */ return_value = ho_recognize_font_1_vav (array_in); break; case 7: /* zayin */ return_value = ho_recognize_font_1_zayin (array_in); break; case 8: /* het */ return_value = ho_recognize_font_1_het (array_in); break; case 9: /* tet */ return_value = ho_recognize_font_1_tet (array_in); break; case 10: /* yud */ return_value = ho_recognize_font_1_yud (array_in); break; case 11: /* caf */ return_value = ho_recognize_font_1_caf (array_in); break; case 12: /* caf sofit */ return_value = ho_recognize_font_1_caf_sofit (array_in); break; case 13: /* lamed */ return_value = ho_recognize_font_1_lamed (array_in); break; case 14: /* mem */ return_value = ho_recognize_font_1_mem (array_in); break; case 15: /* mem sofit */ return_value = ho_recognize_font_1_mem_sofit (array_in); break; case 16: /* nun */ return_value = ho_recognize_font_1_nun (array_in); break; case 17: /* nun sofit */ return_value = ho_recognize_font_1_nun_sofit (array_in); break; case 18: /* samech */ return_value = ho_recognize_font_1_samech (array_in); break; case 19: /* ayin */ return_value = ho_recognize_font_1_ayin (array_in); break; case 20: /* pey */ return_value = ho_recognize_font_1_pey (array_in); break; case 21: /* pey sofit */ return_value = ho_recognize_font_1_pey_sofit (array_in); break; case 22: /* tzadi */ return_value = ho_recognize_font_1_tzadi (array_in); break; case 23: /* tzadi sofit */ return_value = ho_recognize_font_1_tzadi_sofit (array_in); break; case 24: /* kuf */ return_value = ho_recognize_font_1_kuf (array_in); break; case 25: /* resh */ return_value = ho_recognize_font_1_resh (array_in); break; case 26: /* shin */ return_value = ho_recognize_font_1_shin (array_in); break; case 27: /* tav */ return_value = ho_recognize_font_1_tav (array_in); break; case 28: /* dot */ return_value = ho_recognize_font_1_dot (array_in); break; case 29: /* comma */ return_value = ho_recognize_font_1_comma (array_in); break; case 30: /* tag */ return_value = ho_recognize_font_1_tag (array_in); break; case 31: /* two tags */ return_value = ho_recognize_font_1_two_tags (array_in); break; case 32: /* ? */ return_value = ho_recognize_font_1_question (array_in); break; case 33: /* ! */ return_value = ho_recognize_font_1_exclem (array_in); break; case 34: /* : */ return_value = ho_recognize_font_1_dot_dot (array_in); break; case 35: /* ; */ return_value = ho_recognize_font_1_dot_comma (array_in); break; case 36: /* ) */ return_value = ho_recognize_font_1_open (array_in); break; case 37: /* ( */ return_value = ho_recognize_font_1_close (array_in); break; case 38: /* minus */ return_value = ho_recognize_font_1_minus (array_in); break; case 39: /* plus */ return_value = ho_recognize_font_1_plus (array_in); break; case 40: /* div */ return_value = ho_recognize_font_1_div (array_in); break; case 41: /* 0 */ return_value = ho_recognize_font_1_zero (array_in); break; case 42: /* 1 */ return_value = ho_recognize_font_1_one (array_in); break; case 43: /* 2 */ return_value = ho_recognize_font_1_two (array_in); break; case 44: /* 3 */ return_value = ho_recognize_font_1_three (array_in); break; case 45: /* 4 */ return_value = ho_recognize_font_1_four (array_in); break; case 46: /* 5 */ return_value = ho_recognize_font_1_five (array_in); break; case 47: /* 6 */ return_value = ho_recognize_font_1_six (array_in); break; case 48: /* 7 */ return_value = ho_recognize_font_1_seven (array_in); break; case 49: /* 8 */ return_value = ho_recognize_font_1_eight (array_in); break; case 50: /* 9 */ return_value = ho_recognize_font_1_nine (array_in); break; default: return_value = 0.0; break; } } else if (font_code == 1) { switch (sign_index) { case 1: /* alef */ return_value = ho_recognize_font_2_alef (array_in); break; case 2: /* bet */ return_value = ho_recognize_font_2_bet (array_in); break; case 3: /* gimal */ return_value = ho_recognize_font_2_gimal (array_in); break; case 4: /* dalet */ return_value = ho_recognize_font_2_dalet (array_in); break; case 5: /* hey */ return_value = ho_recognize_font_2_hey (array_in); break; case 6: /* vav */ return_value = ho_recognize_font_2_vav (array_in); break; case 7: /* zayin */ return_value = ho_recognize_font_2_zayin (array_in); break; case 8: /* het */ return_value = ho_recognize_font_2_het (array_in); break; case 9: /* tet */ return_value = ho_recognize_font_2_tet (array_in); break; case 10: /* yud */ return_value = ho_recognize_font_2_yud (array_in); break; case 11: /* caf */ return_value = ho_recognize_font_2_caf (array_in); break; case 12: /* caf sofit */ return_value = ho_recognize_font_2_caf_sofit (array_in); break; case 13: /* lamed */ return_value = ho_recognize_font_2_lamed (array_in); break; case 14: /* mem */ return_value = ho_recognize_font_2_mem (array_in); break; case 15: /* mem sofit */ return_value = ho_recognize_font_2_mem_sofit (array_in); break; case 16: /* nun */ return_value = ho_recognize_font_2_nun (array_in); break; case 17: /* nun sofit */ return_value = ho_recognize_font_2_nun_sofit (array_in); break; case 18: /* samech */ return_value = ho_recognize_font_2_samech (array_in); break; case 19: /* ayin */ return_value = ho_recognize_font_2_ayin (array_in); break; case 20: /* pey */ return_value = ho_recognize_font_2_pey (array_in); break; case 21: /* pey sofit */ return_value = ho_recognize_font_2_pey_sofit (array_in); break; case 22: /* tzadi */ return_value = ho_recognize_font_2_tzadi (array_in); break; case 23: /* tzadi sofit */ return_value = ho_recognize_font_2_tzadi_sofit (array_in); break; case 24: /* kuf */ return_value = ho_recognize_font_2_kuf (array_in); break; case 25: /* resh */ return_value = ho_recognize_font_2_resh (array_in); break; case 26: /* shin */ return_value = ho_recognize_font_2_shin (array_in); break; case 27: /* tav */ return_value = ho_recognize_font_2_tav (array_in); break; case 28: /* dot */ return_value = ho_recognize_font_2_dot (array_in); break; case 29: /* comma */ return_value = ho_recognize_font_2_comma (array_in); break; case 30: /* tag */ return_value = ho_recognize_font_2_tag (array_in); break; case 31: /* two tags */ return_value = ho_recognize_font_2_two_tags (array_in); break; case 32: /* ? */ return_value = ho_recognize_font_2_question (array_in); break; case 33: /* ! */ return_value = ho_recognize_font_2_exclem (array_in); break; case 34: /* : */ return_value = ho_recognize_font_2_dot_dot (array_in); break; case 35: /* ; */ return_value = ho_recognize_font_2_dot_comma (array_in); break; case 36: /* ) */ return_value = ho_recognize_font_2_open (array_in); break; case 37: /* ( */ return_value = ho_recognize_font_2_close (array_in); break; case 38: /* minus */ return_value = ho_recognize_font_2_minus (array_in); break; case 39: /* plus */ return_value = ho_recognize_font_2_plus (array_in); break; case 40: /* div */ return_value = ho_recognize_font_2_div (array_in); break; case 41: /* 0 */ return_value = ho_recognize_font_2_zero (array_in); break; case 42: /* 1 */ return_value = ho_recognize_font_2_one (array_in); break; case 43: /* 2 */ return_value = ho_recognize_font_2_two (array_in); break; case 44: /* 3 */ return_value = ho_recognize_font_2_three (array_in); break; case 45: /* 4 */ return_value = ho_recognize_font_2_four (array_in); break; case 46: /* 5 */ return_value = ho_recognize_font_2_five (array_in); break; case 47: /* 6 */ return_value = ho_recognize_font_2_six (array_in); break; case 48: /* 7 */ return_value = ho_recognize_font_2_seven (array_in); break; case 49: /* 8 */ return_value = ho_recognize_font_2_eight (array_in); break; case 50: /* 9 */ return_value = ho_recognize_font_2_nine (array_in); break; default: return_value = 0.0; break; } } else if (font_code == 2) { switch (sign_index) { case 1: /* alef */ return_value = ho_recognize_font_3_alef (array_in); break; case 2: /* bet */ return_value = ho_recognize_font_3_bet (array_in); break; case 3: /* gimal */ return_value = ho_recognize_font_3_gimal (array_in); break; case 4: /* dalet */ return_value = ho_recognize_font_3_dalet (array_in); break; case 5: /* hey */ return_value = ho_recognize_font_3_hey (array_in); break; case 6: /* vav */ return_value = ho_recognize_font_3_vav (array_in); break; case 7: /* zayin */ return_value = ho_recognize_font_3_zayin (array_in); break; case 8: /* het */ return_value = ho_recognize_font_3_het (array_in); break; case 9: /* tet */ return_value = ho_recognize_font_3_tet (array_in); break; case 10: /* yud */ return_value = ho_recognize_font_3_yud (array_in); break; case 11: /* caf */ return_value = ho_recognize_font_3_caf (array_in); break; case 12: /* caf sofit */ return_value = ho_recognize_font_3_caf_sofit (array_in); break; case 13: /* lamed */ return_value = ho_recognize_font_3_lamed (array_in); break; case 14: /* mem */ return_value = ho_recognize_font_3_mem (array_in); break; case 15: /* mem sofit */ return_value = ho_recognize_font_3_mem_sofit (array_in); break; case 16: /* nun */ return_value = ho_recognize_font_3_nun (array_in); break; case 17: /* nun sofit */ return_value = ho_recognize_font_3_nun_sofit (array_in); break; case 18: /* samech */ return_value = ho_recognize_font_3_samech (array_in); break; case 19: /* ayin */ return_value = ho_recognize_font_3_ayin (array_in); break; case 20: /* pey */ return_value = ho_recognize_font_3_pey (array_in); break; case 21: /* pey sofit */ return_value = ho_recognize_font_3_pey_sofit (array_in); break; case 22: /* tzadi */ return_value = ho_recognize_font_3_tzadi (array_in); break; case 23: /* tzadi sofit */ return_value = ho_recognize_font_3_tzadi_sofit (array_in); break; case 24: /* kuf */ return_value = ho_recognize_font_3_kuf (array_in); break; case 25: /* resh */ return_value = ho_recognize_font_3_resh (array_in); break; case 26: /* shin */ return_value = ho_recognize_font_3_shin (array_in); break; case 27: /* tav */ return_value = ho_recognize_font_3_tav (array_in); break; case 28: /* dot */ return_value = ho_recognize_font_3_dot (array_in); break; case 29: /* comma */ return_value = ho_recognize_font_3_comma (array_in); break; case 30: /* tag */ return_value = ho_recognize_font_3_tag (array_in); break; case 31: /* two tags */ return_value = ho_recognize_font_3_two_tags (array_in); break; case 32: /* ? */ return_value = ho_recognize_font_3_question (array_in); break; case 33: /* ! */ return_value = ho_recognize_font_3_exclem (array_in); break; case 34: /* : */ return_value = ho_recognize_font_3_dot_dot (array_in); break; case 35: /* ; */ return_value = ho_recognize_font_3_dot_comma (array_in); break; case 36: /* ) */ return_value = ho_recognize_font_3_open (array_in); break; case 37: /* ( */ return_value = ho_recognize_font_3_close (array_in); break; case 38: /* minus */ return_value = ho_recognize_font_3_minus (array_in); break; case 39: /* plus */ return_value = ho_recognize_font_3_plus (array_in); break; case 40: /* div */ return_value = ho_recognize_font_3_div (array_in); break; case 41: /* 0 */ return_value = ho_recognize_font_3_zero (array_in); break; case 42: /* 1 */ return_value = ho_recognize_font_3_one (array_in); break; case 43: /* 2 */ return_value = ho_recognize_font_3_two (array_in); break; case 44: /* 3 */ return_value = ho_recognize_font_3_three (array_in); break; case 45: /* 4 */ return_value = ho_recognize_font_3_four (array_in); break; case 46: /* 5 */ return_value = ho_recognize_font_3_five (array_in); break; case 47: /* 6 */ return_value = ho_recognize_font_3_six (array_in); break; case 48: /* 7 */ return_value = ho_recognize_font_3_seven (array_in); break; case 49: /* 8 */ return_value = ho_recognize_font_3_eight (array_in); break; case 50: /* 9 */ return_value = ho_recognize_font_3_nine (array_in); break; default: return_value = 0.0; break; } } else if (font_code == 3) { switch (sign_index) { case 1: /* alef */ return_value = ho_recognize_font_4_alef (array_in); break; case 2: /* bet */ return_value = ho_recognize_font_4_bet (array_in); break; case 3: /* gimal */ return_value = ho_recognize_font_4_gimal (array_in); break; case 4: /* dalet */ return_value = ho_recognize_font_4_dalet (array_in); break; case 5: /* hey */ return_value = ho_recognize_font_4_hey (array_in); break; case 6: /* vav */ return_value = ho_recognize_font_4_vav (array_in); break; case 7: /* zayin */ return_value = ho_recognize_font_4_zayin (array_in); break; case 8: /* het */ return_value = ho_recognize_font_4_het (array_in); break; case 9: /* tet */ return_value = ho_recognize_font_4_tet (array_in); break; case 10: /* yud */ return_value = ho_recognize_font_4_yud (array_in); break; case 11: /* caf */ return_value = ho_recognize_font_4_caf (array_in); break; case 12: /* caf sofit */ return_value = ho_recognize_font_4_caf_sofit (array_in); break; case 13: /* lamed */ return_value = ho_recognize_font_4_lamed (array_in); break; case 14: /* mem */ return_value = ho_recognize_font_4_mem (array_in); break; case 15: /* mem sofit */ return_value = ho_recognize_font_4_mem_sofit (array_in); break; case 16: /* nun */ return_value = ho_recognize_font_4_nun (array_in); break; case 17: /* nun sofit */ return_value = ho_recognize_font_4_nun_sofit (array_in); break; case 18: /* samech */ return_value = ho_recognize_font_4_samech (array_in); break; case 19: /* ayin */ return_value = ho_recognize_font_4_ayin (array_in); break; case 20: /* pey */ return_value = ho_recognize_font_4_pey (array_in); break; case 21: /* pey sofit */ return_value = ho_recognize_font_4_pey_sofit (array_in); break; case 22: /* tzadi */ return_value = ho_recognize_font_4_tzadi (array_in); break; case 23: /* tzadi sofit */ return_value = ho_recognize_font_4_tzadi_sofit (array_in); break; case 24: /* kuf */ return_value = ho_recognize_font_4_kuf (array_in); break; case 25: /* resh */ return_value = ho_recognize_font_4_resh (array_in); break; case 26: /* shin */ return_value = ho_recognize_font_4_shin (array_in); break; case 27: /* tav */ return_value = ho_recognize_font_4_tav (array_in); break; case 28: /* dot */ return_value = ho_recognize_font_4_dot (array_in); break; case 29: /* comma */ return_value = ho_recognize_font_4_comma (array_in); break; case 30: /* tag */ return_value = ho_recognize_font_4_tag (array_in); break; case 31: /* two tags */ return_value = ho_recognize_font_4_two_tags (array_in); break; case 32: /* ? */ return_value = ho_recognize_font_4_question (array_in); break; case 33: /* ! */ return_value = ho_recognize_font_4_exclem (array_in); break; case 34: /* : */ return_value = ho_recognize_font_4_dot_dot (array_in); break; case 35: /* ; */ return_value = ho_recognize_font_4_dot_comma (array_in); break; case 36: /* ) */ return_value = ho_recognize_font_4_open (array_in); break; case 37: /* ( */ return_value = ho_recognize_font_4_close (array_in); break; case 38: /* minus */ return_value = ho_recognize_font_4_minus (array_in); break; case 39: /* plus */ return_value = ho_recognize_font_4_plus (array_in); break; case 40: /* div */ return_value = ho_recognize_font_4_div (array_in); break; case 41: /* 0 */ return_value = ho_recognize_font_4_zero (array_in); break; case 42: /* 1 */ return_value = ho_recognize_font_4_one (array_in); break; case 43: /* 2 */ return_value = ho_recognize_font_4_two (array_in); break; case 44: /* 3 */ return_value = ho_recognize_font_4_three (array_in); break; case 45: /* 4 */ return_value = ho_recognize_font_4_four (array_in); break; case 46: /* 5 */ return_value = ho_recognize_font_4_five (array_in); break; case 47: /* 6 */ return_value = ho_recognize_font_4_six (array_in); break; case 48: /* 7 */ return_value = ho_recognize_font_4_seven (array_in); break; case 49: /* 8 */ return_value = ho_recognize_font_4_eight (array_in); break; case 50: /* 9 */ return_value = ho_recognize_font_4_nine (array_in); break; default: return_value = 0.0; break; } } else if (font_code == 4) { switch (sign_index) { case 1: /* alef */ return_value = ho_recognize_font_5_alef (array_in); break; case 2: /* bet */ return_value = ho_recognize_font_5_bet (array_in); break; case 3: /* gimal */ return_value = ho_recognize_font_5_gimal (array_in); break; case 4: /* dalet */ return_value = ho_recognize_font_5_dalet (array_in); break; case 5: /* hey */ return_value = ho_recognize_font_5_hey (array_in); break; case 6: /* vav */ return_value = ho_recognize_font_5_vav (array_in); break; case 7: /* zayin */ return_value = ho_recognize_font_5_zayin (array_in); break; case 8: /* het */ return_value = ho_recognize_font_5_het (array_in); break; case 9: /* tet */ return_value = ho_recognize_font_5_tet (array_in); break; case 10: /* yud */ return_value = ho_recognize_font_5_yud (array_in); break; case 11: /* caf */ return_value = ho_recognize_font_5_caf (array_in); break; case 12: /* caf sofit */ return_value = ho_recognize_font_5_caf_sofit (array_in); break; case 13: /* lamed */ return_value = ho_recognize_font_5_lamed (array_in); break; case 14: /* mem */ return_value = ho_recognize_font_5_mem (array_in); break; case 15: /* mem sofit */ return_value = ho_recognize_font_5_mem_sofit (array_in); break; case 16: /* nun */ return_value = ho_recognize_font_5_nun (array_in); break; case 17: /* nun sofit */ return_value = ho_recognize_font_5_nun_sofit (array_in); break; case 18: /* samech */ return_value = ho_recognize_font_5_samech (array_in); break; case 19: /* ayin */ return_value = ho_recognize_font_5_ayin (array_in); break; case 20: /* pey */ return_value = ho_recognize_font_5_pey (array_in); break; case 21: /* pey sofit */ return_value = ho_recognize_font_5_pey_sofit (array_in); break; case 22: /* tzadi */ return_value = ho_recognize_font_5_tzadi (array_in); break; case 23: /* tzadi sofit */ return_value = ho_recognize_font_5_tzadi_sofit (array_in); break; case 24: /* kuf */ return_value = ho_recognize_font_5_kuf (array_in); break; case 25: /* resh */ return_value = ho_recognize_font_5_resh (array_in); break; case 26: /* shin */ return_value = ho_recognize_font_5_shin (array_in); break; case 27: /* tav */ return_value = ho_recognize_font_5_tav (array_in); break; case 28: /* dot */ return_value = ho_recognize_font_5_dot (array_in); break; case 29: /* comma */ return_value = ho_recognize_font_5_comma (array_in); break; case 30: /* tag */ return_value = ho_recognize_font_5_tag (array_in); break; case 31: /* two tags */ return_value = ho_recognize_font_5_two_tags (array_in); break; case 32: /* ? */ return_value = ho_recognize_font_5_question (array_in); break; case 33: /* ! */ return_value = ho_recognize_font_5_exclem (array_in); break; case 34: /* : */ return_value = ho_recognize_font_5_dot_dot (array_in); break; case 35: /* ; */ return_value = ho_recognize_font_5_dot_comma (array_in); break; case 36: /* ) */ return_value = ho_recognize_font_5_open (array_in); break; case 37: /* ( */ return_value = ho_recognize_font_5_close (array_in); break; case 38: /* minus */ return_value = ho_recognize_font_5_minus (array_in); break; case 39: /* plus */ return_value = ho_recognize_font_5_plus (array_in); break; case 40: /* div */ return_value = ho_recognize_font_5_div (array_in); break; case 41: /* 0 */ return_value = ho_recognize_font_5_zero (array_in); break; case 42: /* 1 */ return_value = ho_recognize_font_5_one (array_in); break; case 43: /* 2 */ return_value = ho_recognize_font_5_two (array_in); break; case 44: /* 3 */ return_value = ho_recognize_font_5_three (array_in); break; case 45: /* 4 */ return_value = ho_recognize_font_5_four (array_in); break; case 46: /* 5 */ return_value = ho_recognize_font_5_five (array_in); break; case 47: /* 6 */ return_value = ho_recognize_font_5_six (array_in); break; case 48: /* 7 */ return_value = ho_recognize_font_5_seven (array_in); break; case 49: /* 8 */ return_value = ho_recognize_font_5_eight (array_in); break; case 50: /* 9 */ return_value = ho_recognize_font_5_nine (array_in); break; default: return_value = 0.0; break; } } else if (font_code == 5) { switch (sign_index) { case 1: /* alef */ return_value = ho_recognize_font_6_alef (array_in); break; case 2: /* bet */ return_value = ho_recognize_font_6_bet (array_in); break; case 3: /* gimal */ return_value = ho_recognize_font_6_gimal (array_in); break; case 4: /* dalet */ return_value = ho_recognize_font_6_dalet (array_in); break; case 5: /* hey */ return_value = ho_recognize_font_6_hey (array_in); break; case 6: /* vav */ return_value = ho_recognize_font_6_vav (array_in); break; case 7: /* zayin */ return_value = ho_recognize_font_6_zayin (array_in); break; case 8: /* het */ return_value = ho_recognize_font_6_het (array_in); break; case 9: /* tet */ return_value = ho_recognize_font_6_tet (array_in); break; case 10: /* yud */ return_value = ho_recognize_font_6_yud (array_in); break; case 11: /* caf */ return_value = ho_recognize_font_6_caf (array_in); break; case 12: /* caf sofit */ return_value = ho_recognize_font_6_caf_sofit (array_in); break; case 13: /* lamed */ return_value = ho_recognize_font_6_lamed (array_in); break; case 14: /* mem */ return_value = ho_recognize_font_6_mem (array_in); break; case 15: /* mem sofit */ return_value = ho_recognize_font_6_mem_sofit (array_in); break; case 16: /* nun */ return_value = ho_recognize_font_6_nun (array_in); break; case 17: /* nun sofit */ return_value = ho_recognize_font_6_nun_sofit (array_in); break; case 18: /* samech */ return_value = ho_recognize_font_6_samech (array_in); break; case 19: /* ayin */ return_value = ho_recognize_font_6_ayin (array_in); break; case 20: /* pey */ return_value = ho_recognize_font_6_pey (array_in); break; case 21: /* pey sofit */ return_value = ho_recognize_font_6_pey_sofit (array_in); break; case 22: /* tzadi */ return_value = ho_recognize_font_6_tzadi (array_in); break; case 23: /* tzadi sofit */ return_value = ho_recognize_font_6_tzadi_sofit (array_in); break; case 24: /* kuf */ return_value = ho_recognize_font_6_kuf (array_in); break; case 25: /* resh */ return_value = ho_recognize_font_6_resh (array_in); break; case 26: /* shin */ return_value = ho_recognize_font_6_shin (array_in); break; case 27: /* tav */ return_value = ho_recognize_font_6_tav (array_in); break; case 28: /* dot */ return_value = ho_recognize_font_6_dot (array_in); break; case 29: /* comma */ return_value = ho_recognize_font_6_comma (array_in); break; case 30: /* tag */ return_value = ho_recognize_font_6_tag (array_in); break; case 31: /* two tags */ return_value = ho_recognize_font_6_two_tags (array_in); break; case 32: /* ? */ return_value = ho_recognize_font_6_question (array_in); break; case 33: /* ! */ return_value = ho_recognize_font_6_exclem (array_in); break; case 34: /* : */ return_value = ho_recognize_font_6_dot_dot (array_in); break; case 35: /* ; */ return_value = ho_recognize_font_6_dot_comma (array_in); break; case 36: /* ) */ return_value = ho_recognize_font_6_open (array_in); break; case 37: /* ( */ return_value = ho_recognize_font_6_close (array_in); break; case 38: /* minus */ return_value = ho_recognize_font_6_minus (array_in); break; case 39: /* plus */ return_value = ho_recognize_font_6_plus (array_in); break; case 40: /* div */ return_value = ho_recognize_font_6_div (array_in); break; case 41: /* 0 */ return_value = ho_recognize_font_6_zero (array_in); break; case 42: /* 1 */ return_value = ho_recognize_font_6_one (array_in); break; case 43: /* 2 */ return_value = ho_recognize_font_6_two (array_in); break; case 44: /* 3 */ return_value = ho_recognize_font_6_three (array_in); break; case 45: /* 4 */ return_value = ho_recognize_font_6_four (array_in); break; case 46: /* 5 */ return_value = ho_recognize_font_6_five (array_in); break; case 47: /* 6 */ return_value = ho_recognize_font_6_six (array_in); break; case 48: /* 7 */ return_value = ho_recognize_font_6_seven (array_in); break; case 49: /* 8 */ return_value = ho_recognize_font_6_eight (array_in); break; case 50: /* 9 */ return_value = ho_recognize_font_6_nine (array_in); break; default: return_value = 0.0; break; } } /* we only use the 0..1 range */ if (return_value < 0.0) return_value = 0.0; if (return_value > 1.0) return_value = 1.0; return return_value; } int ho_recognize_create_array_out (const double *array_in, double *array_out, int font_code) { int i; /* set array out */ array_out[0] = 0.1; /* do morphologic tests */ for (i = 1; i < HO_ARRAY_OUT_SIZE; i++) array_out[i] = ho_recognize_array (array_in, i, font_code); return FALSE; } const char * ho_recognize_array_out_to_font (const double *array_out, int *this_char_i) { int i = 0; int max_i = 0; /* find the font with hiegher score */ for (i = 1; i < HO_ARRAY_OUT_SIZE; i++) if (array_out[i] > array_out[max_i]) max_i = i; *this_char_i = max_i; return ho_sign_array[max_i]; } const char * ho_recognize_font (const ho_bitmap * m_text, const ho_bitmap * m_mask, int font_code, unsigned char do_linguistics, unsigned char word_end, unsigned char word_start, int *this_char_i, int last_char_i) { double array_in[HO_ARRAY_IN_SIZE]; double array_out[HO_ARRAY_OUT_SIZE]; const char *font; ho_recognize_create_array_in (m_text, m_mask, array_in); ho_recognize_create_array_out (array_in, array_out, font_code); /* linguistics */ if (do_linguistics) { ho_linguistics_adjust_array_out (array_out, word_end, word_start, last_char_i); } font = ho_recognize_array_out_to_font (array_out, this_char_i); return font; } libhocr-0.10.17/src/ho_font.c0000644000175000017500000017747011051625663012637 00000000000000 /*************************************************************************** * ho_font.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_pixbuf.h" #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" ho_bitmap * ho_font_main_sign (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_objmap *o_obj = NULL; ho_bitmap *m_sign_mask = NULL; ho_bitmap *m_current_object = NULL; int x, y, y1, y2, x1, x2; int i; int line_start, line_end, line_height; unsigned char is_inside; unsigned char is_dot; int count_dots; /* get line_height */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get all the objects of the font */ o_obj = ho_objmap_new_from_bitmap (m_text); if (!o_obj) return NULL; /* if only one object, just return it */ if (ho_objmap_get_size (o_obj) == 1) { ho_objmap_free (o_obj); m_sign_mask = ho_bitmap_clone (m_text); /* clean top and bottom lines, just in case */ ho_bitmap_delete_hline (m_sign_mask, 0, 0, m_sign_mask->width); ho_bitmap_delete_hline (m_sign_mask, 0, m_sign_mask->height - 1, m_sign_mask->width); return m_sign_mask; } /* more than one object */ m_sign_mask = ho_bitmap_new (m_text->width, m_text->height); if (!m_sign_mask) return NULL; /* copy all the objects inside the line */ count_dots = 0; for (i = 0; i < ho_objmap_get_size (o_obj); i++) { /* is this object inside line ? */ y1 = ho_objmap_get_object (o_obj, i).y; y2 = ho_objmap_get_object (o_obj, i).y + ho_objmap_get_object (o_obj, i).height; x1 = ho_objmap_get_object (o_obj, i).x; x2 = ho_objmap_get_object (o_obj, i).x + ho_objmap_get_object (o_obj, i).width; is_inside = ((y1 >= line_start && y1 < line_end - line_height / 10) || (y2 > line_start + line_height / 10 && y2 <= line_end) || (y1 <= line_start && y2 >= line_end)); is_dot = ((y2 - y1) < line_height / 4 && (y2 - y1) > line_height / 16 && (x2 - x1) < line_height / 4 && (x2 - x1) > line_height / 16); /* can't be more than two dots (one - dagesh, two - shva) */ if (is_dot && is_inside) count_dots++; if (count_dots > 2) is_dot = FALSE; if (is_inside && !is_dot) { /* copy the object to output bitmap */ m_current_object = ho_objmap_to_bitmap_by_index (o_obj, i); if (m_current_object) { ho_bitmap_or (m_sign_mask, m_current_object); ho_bitmap_free (m_current_object); } } } /* clean top and bottom lines, just in case */ ho_bitmap_delete_hline (m_sign_mask, 0, 0, m_sign_mask->width); ho_bitmap_delete_hline (m_sign_mask, 0, m_sign_mask->height - 1, m_sign_mask->width); ho_objmap_free (o_obj); return m_sign_mask; } ho_bitmap * ho_font_second_object (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_objmap *o_obj = NULL; ho_bitmap *m_sign_mask = NULL; ho_bitmap *m_current_object = NULL; int x, y; int i, dy; int line_start, line_end, line_height; /* get line_height */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; /* get all the objects of the font */ o_obj = ho_objmap_new_from_bitmap (m_text); if (!o_obj) return NULL; /* if not two objects, return NULL */ if (ho_objmap_get_size (o_obj) < 2) { ho_objmap_free (o_obj); return NULL; } /* more than one object */ m_sign_mask = ho_bitmap_new (m_text->width, m_text->height); if (!m_sign_mask) return NULL; /* copy the first object found from lower left of font */ dy = line_height / 10; if (dy == 0) dy = 1; for (i = 0, y = line_end - 1, x = 1; x < o_obj->width && y > 0 && !i; x++, y--) { i = ho_objmap_get (o_obj, x, y); if (!i && y > dy) i = ho_objmap_get (o_obj, x, y - dy); if (!i && y < (o_obj->height - dy)) i = ho_objmap_get (o_obj, x, y + dy); } if (i) m_current_object = ho_objmap_to_bitmap_by_index (o_obj, i - 1); if (m_current_object) { ho_bitmap_or (m_sign_mask, m_current_object); ho_bitmap_free (m_current_object); } ho_objmap_free (o_obj); return m_sign_mask; } ho_bitmap * ho_font_holes (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_negative = NULL; ho_bitmap *m_out = NULL; int x, y, line_height; /* get line_height */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_height = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_height = y - line_height; m_negative = ho_bitmap_not (m_text); if (!m_negative) return NULL; /* link all background elemnts */ ho_bitmap_draw_vline (m_negative, 1, 0, m_negative->height - 1); ho_bitmap_draw_vline (m_negative, m_negative->width - 1, 0, m_negative->height - 1); ho_bitmap_draw_hline (m_negative, 0, 0, m_negative->width - 1); ho_bitmap_draw_hline (m_negative, 0, m_negative->height - 2, m_negative->width - 1); m_out = ho_bitmap_filter_by_size (m_negative, line_height / 5, m_negative->height - 2, line_height / 10, m_negative->width - 2); ho_bitmap_free (m_negative); return m_out; } ho_bitmap * ho_font_hbars (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_main_font = NULL; ho_bitmap *m_temp = NULL; ho_bitmap *m_bars = NULL; ho_bitmap *m_out = NULL; int i, x, y, line_height, y_start; int number_of_parts = 20; int threshold = 65; int sum; /* get font height */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height) return NULL; /* maybe this font is realy broken, dialate */ m_temp = ho_bitmap_clone (m_text); if (!m_temp) return NULL; m_main_font = m_temp; /* in thin fonts do not chop the font too fine */ if (line_height / number_of_parts < 3) number_of_parts = line_height / 3; /* chop main font to vertical parts */ for (i = 1; i < number_of_parts; i++) ho_bitmap_delete_hline (m_main_font, 0, y_start + i * line_height / number_of_parts, m_text->width); /* look for wide objects */ m_bars = ho_bitmap_filter_by_size (m_main_font, 1, line_height * 2, threshold * m_text->width / 100, m_text->width + 5); ho_bitmap_free (m_main_font); if (!m_bars) return NULL; /* relink the vertical parts and cut off dialated parts */ m_out = ho_bitmap_vlink (m_bars, 3); ho_bitmap_free (m_bars); ho_bitmap_and (m_out, m_text); /* make bars */ for (y = y_start; y < y_start + line_height; y++) for (x = 0; x < m_text->width; x++) { if (ho_bitmap_get (m_out, x, y)) { ho_bitmap_draw_hline (m_out, 0, y, m_out->width); continue; } } m_temp = m_out; m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; { int min_y; y = 1; for (; y < m_text->height && !ho_bitmap_get (m_temp, 2, y); y++) ; while (y < m_text->height) { /* get start&end of notch line */ min_y = y - 1; for (; y < m_text->height && ho_bitmap_get (m_temp, 2, y); y++) ; /* draw line on minimal interfont space */ ho_bitmap_draw_hline (m_out, 0, (y + min_y) / 2, m_out->width); for (; y < m_text->height && !ho_bitmap_get (m_temp, 2, y); y++) ; } } ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_vbars (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_main_font = NULL; ho_bitmap *m_temp = NULL; ho_bitmap *m_bars = NULL; ho_bitmap *m_out = NULL; int sum, i, x, y, line_height, y_start; int number_of_parts = 12; int threshold = 70; /* get font height */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height) return NULL; m_temp = ho_bitmap_clone (m_text); if (!m_temp) return NULL; m_main_font = m_temp; /* in thin fonts do not chop the font too fine */ if (m_text->width / number_of_parts < 3) number_of_parts = m_text->width / 3; /* chop main font to vertical parts */ for (i = 1; i < number_of_parts; i++) ho_bitmap_delete_vline (m_main_font, i * m_text->width / number_of_parts, 0, m_text->height); /* look for high objects */ m_bars = ho_bitmap_filter_by_size (m_main_font, threshold * line_height / 100, line_height * 2, 1, m_text->width); ho_bitmap_free (m_main_font); if (!m_bars) return NULL; /* relink the vertical parts and cut off dialated parts */ m_out = ho_bitmap_hlink (m_bars, 3); ho_bitmap_free (m_bars); ho_bitmap_and (m_out, m_text); /* make bars */ for (x = 0; x < m_text->width; x++) for (y = y_start; y < y_start + line_height; y++) { if (ho_bitmap_get (m_out, x, y)) { ho_bitmap_draw_vline (m_out, x, 0, m_text->height); continue; } } m_temp = m_out; m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; { int min_x; x = 1; for (; x < m_text->width && !ho_bitmap_get (m_temp, x, 2); x++) ; while (x < m_text->width) { /* get start&end of notch line */ min_x = x - 1; for (; x < m_text->width && ho_bitmap_get (m_temp, x, 2); x++) ; /* draw line on minimal interfont space */ ho_bitmap_draw_vline (m_out, (x + min_x) / 2, 0, m_out->height); for (; x < m_text->width && !ho_bitmap_get (m_temp, x, 2); x++) ; } } ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_diagonal (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_diagonal_mask = NULL; ho_bitmap *m_main_font = NULL; ho_bitmap *m_temp = NULL; ho_bitmap *m_bars = NULL; int sum, x, y, line_height, y_start; int threshold = 90; /* get font height */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || !m_mask->width) return NULL; /* maybe this font is realy broken, dialate twice */ m_temp = ho_bitmap_clone (m_text); if (!m_temp) return NULL; m_main_font = m_temp; /* create diagonal mask */ m_diagonal_mask = ho_bitmap_clone (m_mask); if (!m_diagonal_mask) { ho_bitmap_free (m_temp); return NULL; } for (x = 0; x < m_mask->width; x++) { ho_bitmap_delete_vline (m_diagonal_mask, x, y_start, x * line_height / m_mask->width - line_height / 6); ho_bitmap_delete_vline (m_diagonal_mask, x, y_start + x * line_height / m_mask->width + line_height / 6, line_height); } ho_bitmap_and (m_main_font, m_diagonal_mask); ho_bitmap_free (m_diagonal_mask); /* look for high objects */ m_bars = ho_bitmap_filter_by_size (m_main_font, threshold * line_height / 100, line_height * 2, 1, m_text->width); ho_bitmap_free (m_main_font); if (!m_bars) return NULL; /* cut off dialated parts */ ho_bitmap_and (m_bars, m_text); /* fix the x and y of the output bitmap */ m_bars->x = m_text->x; m_bars->y = m_text->y; return m_bars; } ho_bitmap * ho_font_diagonal_left (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_diagonal_mask = NULL; ho_bitmap *m_main_font = NULL; ho_bitmap *m_temp = NULL; ho_bitmap *m_bars = NULL; int sum, x, y, line_height, y_start; int threshold = 90; /* get font height */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || !m_mask->width) return NULL; /* maybe this font is realy broken, dialate twice */ m_temp = ho_bitmap_clone (m_text); if (!m_temp) return NULL; m_main_font = m_temp; /* create diagonal mask */ m_diagonal_mask = ho_bitmap_clone (m_mask); if (!m_diagonal_mask) { ho_bitmap_free (m_temp); return NULL; } for (x = 0; x < m_mask->width; x++) { ho_bitmap_delete_vline (m_diagonal_mask, m_mask->width - x - 1, y_start, x * line_height / m_mask->width - line_height / 6); ho_bitmap_delete_vline (m_diagonal_mask, m_mask->width - x - 1, y_start + x * line_height / m_mask->width + line_height / 6, line_height); } ho_bitmap_and (m_main_font, m_diagonal_mask); ho_bitmap_free (m_diagonal_mask); /* look for high objects */ m_bars = ho_bitmap_filter_by_size (m_main_font, threshold * line_height / 100, line_height * 2, 1, m_text->width); ho_bitmap_free (m_main_font); if (!m_bars) return NULL; /* cut off dialated parts */ ho_bitmap_and (m_bars, m_text); /* fix the x and y of the output bitmap */ m_bars->x = m_text->x; m_bars->y = m_text->y; return m_bars; } ho_bitmap * ho_font_thin_naive (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int sum, x, y, line_height, y_start; unsigned char direction; unsigned char thin = TRUE; unsigned char thinned = TRUE; unsigned char edge_pixel = FALSE; unsigned char neighbors; unsigned char neighbors_up; unsigned char neighbors_down; unsigned char neighbors_right; unsigned char neighbors_left; unsigned char neighbors_horizontal; unsigned char neighbors_vertical; /* get font height */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || !m_mask->width) return NULL; /* copy the original font */ m_out = ho_bitmap_dilation_n (m_text, 6); if (!m_out) return NULL; m_temp = ho_bitmap_new (m_text->width, m_text->height); if (!m_temp) return NULL; /* clean the edges */ ho_bitmap_delete_vline (m_out, 0, 0, m_out->height - 1); ho_bitmap_delete_vline (m_out, m_out->width - 1, 0, m_out->height - 1); ho_bitmap_delete_hline (m_out, 0, 0, m_out->width - 1); ho_bitmap_delete_hline (m_out, 0, m_out->height - 1, m_out->width - 1); /* do until no pixel is thinned */ while (thinned) { thinned = FALSE; /* east,west,north,south scans */ for (direction = 0; direction < 4; direction++) { /* get a temporary image to work on */ ho_bitmap_copy (m_temp, m_out); /* look at evry pixel */ for (x = 1; x < m_text->width - 1; x++) for (y = 1; y < m_text->height - 1; y++) { /* is this an edge pixel for this direction */ switch (direction) { case 0: edge_pixel = ho_bitmap_get (m_out, x, y) && !ho_bitmap_get (m_out, x, y + 1); break; case 1: edge_pixel = ho_bitmap_get (m_out, x, y) && !ho_bitmap_get (m_out, x + 1, y); break; case 2: edge_pixel = ho_bitmap_get (m_out, x, y) && !ho_bitmap_get (m_out, x, y - 1); break; case 3: edge_pixel = ho_bitmap_get (m_out, x, y) && !ho_bitmap_get (m_out, x - 1, y); break; } /* if this is an edge */ if (edge_pixel) { /* look at the border pixels */ neighbors = ho_bitmap_get (m_out, x + 1, y + 1) + ho_bitmap_get (m_out, x + 1, y) + ho_bitmap_get (m_out, x + 1, y - 1) + ho_bitmap_get (m_out, x - 1, y + 1) + ho_bitmap_get (m_out, x - 1, y) + ho_bitmap_get (m_out, x - 1, y - 1) + ho_bitmap_get (m_out, x, y - 1) + ho_bitmap_get (m_out, x, y + 1); neighbors_up = ho_bitmap_get (m_out, x + 1, y - 1) + ho_bitmap_get (m_out, x - 1, y - 1) + ho_bitmap_get (m_out, x, y - 1); neighbors_down = ho_bitmap_get (m_out, x + 1, y + 1) + ho_bitmap_get (m_out, x - 1, y + 1) + ho_bitmap_get (m_out, x, y + 1); neighbors_right = ho_bitmap_get (m_out, x - 1, y - 1) + ho_bitmap_get (m_out, x - 1, y) + ho_bitmap_get (m_out, x - 1, y + 1); neighbors_left = ho_bitmap_get (m_out, x + 1, y - 1) + ho_bitmap_get (m_out, x + 1, y) + ho_bitmap_get (m_out, x + 1, y + 1); neighbors_horizontal = ho_bitmap_get (m_out, x - 1, y) + ho_bitmap_get (m_out, x + 1, y); neighbors_vertical = ho_bitmap_get (m_out, x, y - 1) + ho_bitmap_get (m_out, x, y + 1); /* only one neigbor it's an edge */ thin = (neighbors > 1); /* look for side to side connections */ thin = thin && !((neighbors_up && neighbors_down && !neighbors_horizontal) || (neighbors_right && neighbors_left && !neighbors_vertical)); /* look for corner connection */ thin = thin && !(ho_bitmap_get (m_out, x - 1, y - 1) && !ho_bitmap_get (m_out, x, y - 1) && !ho_bitmap_get (m_out, x - 1, y)); thin = thin && !(ho_bitmap_get (m_out, x + 1, y + 1) && !ho_bitmap_get (m_out, x, y + 1) && !ho_bitmap_get (m_out, x + 1, y)); thin = thin && !(ho_bitmap_get (m_out, x - 1, y + 1) && !ho_bitmap_get (m_out, x, y + 1) && !ho_bitmap_get (m_out, x - 1, y)); thin = thin && !(ho_bitmap_get (m_out, x + 1, y - 1) && !ho_bitmap_get (m_out, x, y - 1) && !ho_bitmap_get (m_out, x + 1, y)); if (thin) { ho_bitmap_unset (m_temp, x, y); thinned = TRUE; } } } /* copy the temporary image back to image out */ ho_bitmap_copy (m_out, m_temp); } } ho_bitmap_free (m_temp); return m_out; } ho_bitmap * ho_font_ends (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int x, y; unsigned char neighbors; m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; m_temp = ho_font_thin (m_text, m_mask); if (!m_temp) return NULL; /* look at evry pixel */ for (x = 1; x < m_text->width - 1; x++) for (y = 1; y < m_text->height - 1; y++) { /* is this pixel on */ if (ho_bitmap_get (m_temp, x, y)) { /* look at the border pixels */ neighbors = ho_bitmap_get (m_temp, x + 1, y + 1) + ho_bitmap_get (m_temp, x + 1, y) + ho_bitmap_get (m_temp, x + 1, y - 1) + ho_bitmap_get (m_temp, x - 1, y + 1) + ho_bitmap_get (m_temp, x - 1, y) + ho_bitmap_get (m_temp, x - 1, y - 1) + ho_bitmap_get (m_temp, x, y - 1) + ho_bitmap_get (m_temp, x, y + 1); /* one neigbor it's an end */ if (neighbors < 2) { ho_bitmap_set (m_out, x, y); } } } ho_bitmap_free (m_temp); return m_out; } ho_bitmap * ho_font_cross (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int x, y; unsigned char neighbors; m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; m_temp = ho_font_thin (m_text, m_mask); if (!m_temp) return NULL; /* look at evry pixel */ for (x = 1; x < m_text->width - 1; x++) for (y = 1; y < m_text->height - 1; y++) { /* is this pixel on */ if (ho_bitmap_get (m_temp, x, y)) { /* look at the border pixels */ neighbors = ho_bitmap_get (m_temp, x + 1, y + 1) + ho_bitmap_get (m_temp, x + 1, y) + ho_bitmap_get (m_temp, x + 1, y - 1) + ho_bitmap_get (m_temp, x - 1, y + 1) + ho_bitmap_get (m_temp, x - 1, y) + ho_bitmap_get (m_temp, x - 1, y - 1) + ho_bitmap_get (m_temp, x, y - 1) + ho_bitmap_get (m_temp, x, y + 1); /* more then two neigbors it's a cross */ if (neighbors > 2) { ho_bitmap_set (m_out, x, y); } } } ho_bitmap_free (m_temp); return m_out; } ho_bitmap * ho_font_thin (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int sum, x, y, line_height, y_start; /* get font height */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_text->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || !m_mask->width) return NULL; /* pre process image for thinning */ m_temp = ho_bitmap_erosion_n (m_text, 6); if (!m_temp) return NULL; m_out = ho_bitmap_dilation_n (m_temp, 6); ho_bitmap_free (m_temp); if (!m_out) return NULL; /* do naive thinning */ m_temp = ho_font_thin_naive (m_out, m_mask); ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = m_temp; /* fix holes m_temp = ho_bitmap_hlink (m_out, line_height / 10); * ho_bitmap_free (m_out); if (!m_temp) return NULL; m_out = ho_bitmap_vlink * (m_temp, line_height / 10); ho_bitmap_free (m_temp); if (!m_out) return * NULL; */ /* smoth font edges */ m_temp = ho_bitmap_closing (m_out); ho_bitmap_free (m_out); if (!m_temp) return NULL; /* rethin the font */ m_out = ho_font_thin_naive (m_temp, m_mask); ho_bitmap_free (m_temp); /* delete parts of lines not in original font */ ho_bitmap_and (m_out, m_text); return m_out; } ho_bitmap * ho_font_edges_top (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int sum, x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 10; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* get the fill of the font */ a_height = (int *) calloc (m_text->width, sizeof (int)); if (!a_height) return NULL; /* set y start and y end */ dy = threshold * line_height / 100; y1 = y_start - line_height / 6 - 3; y2 = y_start + line_height / 2 + 3; if (y1 < 0) y1 = 0; dx = m_text->width / 20 + 1; x1 = dx + 1; x2 = m_text->width - x1; for (x = 0; x < m_text->width; x++) { for (y = y1; y < y2 && !ho_bitmap_get (m_text, x, y); y++) ; a_height[x] = (y - y1); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (x = 0; x < m_out->width; x++) { if (((x < dx || a_height[x - dx] > a_height[x] + dy) && (x > m_out->width - dx || a_height[x + dx] > a_height[x] + dy)) || ((x < 2 * dx || a_height[x - dx * 2] > a_height[x] + dy) && (x > m_out->width - 2 * dx || a_height[x + dx * 2] > a_height[x] + dy)) || ((x < 3 * dx || a_height[x - dx * 3] > a_height[x] + dy) && (x > m_out->width - 3 * dx || a_height[x + dx * 3] > a_height[x] + dy))) { ho_bitmap_draw_vline (m_out, x, 0, y_start); } } m_temp = ho_bitmap_hlink (m_out, dx * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_x; int min_x_start; x = 1; for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, 2); x++) ; while (x < m_temp->width) { /* get start&end of notch line */ min_x = x - 1; min_x_start = min_x; for (; x < m_temp->width && ho_bitmap_get (m_temp, x, 2); x++) { if (a_height[min_x] >= a_height[x]) min_x = x; if (a_height[min_x_start] > a_height[x]) min_x_start = x; } /* draw line on minimal interfont space */ ho_bitmap_draw_vline (m_out, (min_x_start + min_x) / 2, 0, m_out->height); for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, 2); x++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_edges_top_big (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int sum, x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 20; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* get the fill of the font */ a_height = (int *) calloc (m_text->width, sizeof (int)); if (!a_height) return NULL; /* set y start and y end */ dy = threshold * line_height / 100; y1 = y_start - line_height / 6 - 3; y2 = y_start + line_height / 2 + 3; if (y1 < 0) y1 = 0; dx = m_text->width / 20 + 1; x1 = dx + 1; x2 = m_text->width - x1; for (x = 0; x < m_text->width; x++) { for (y = y1; y < y2 && !ho_bitmap_get (m_text, x, y); y++) ; a_height[x] = (y - y1); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (x = 0; x < m_out->width; x++) { if (((x < dx || a_height[x - dx] > a_height[x] + dy) && (x > m_out->width - dx || a_height[x + dx] > a_height[x] + dy)) || ((x < 2 * dx || a_height[x - dx * 2] > a_height[x] + dy) && (x > m_out->width - 2 * dx || a_height[x + dx * 2] > a_height[x] + dy)) || ((x < 3 * dx || a_height[x - dx * 3] > a_height[x] + dy) && (x > m_out->width - 3 * dx || a_height[x + dx * 3] > a_height[x] + dy))) { ho_bitmap_draw_vline (m_out, x, 0, y_start); } } m_temp = ho_bitmap_hlink (m_out, dx * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_x; int min_x_start; x = 1; for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, 2); x++) ; while (x < m_temp->width) { /* get start&end of notch line */ min_x = x - 1; min_x_start = min_x; for (; x < m_temp->width && ho_bitmap_get (m_temp, x, 2); x++) { if (a_height[min_x] >= a_height[x]) min_x = x; if (a_height[min_x_start] > a_height[x]) min_x_start = x; } /* draw line on minimal interfont space */ ho_bitmap_draw_vline (m_out, (min_x_start + min_x) / 2, 0, m_out->height); for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, 2); x++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_edges_bottom (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 0; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* get the fill of the font */ a_height = (int *) calloc (m_text->width, sizeof (int)); if (!a_height) return NULL; /* set y start and y end */ dy = threshold * line_height / 100; y1 = y_start + line_height - line_height / 2 - 3; y2 = y_start + line_height + line_height / 6 + 3; if (y2 > m_text->height - 1) y2 = m_text->height - 1; dx = m_text->width / 20 + 1; x1 = dx + 1; x2 = m_text->width - x1; for (x = 0; x < m_text->width; x++) { for (y = y2; y > y1 && !ho_bitmap_get (m_text, x, y); y--) ; a_height[x] = (y2 - y); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (x = 0; x < m_out->width; x++) { if (((x < dx || a_height[x - dx] > (a_height[x] + dy)) && ((x + dx) >= m_out->width - dx || a_height[x + dx] > (a_height[x] + dy))) || ((x < 2 * dx || a_height[x - dx * 2] > (a_height[x] + dy)) && (x > (m_out->width - 2 * dx) || a_height[x + dx * 2] > (a_height[x] + dy))) || ((x < 3 * dx || a_height[x - dx * 3] > (a_height[x] + dy)) && (x > (m_out->width - 3 * dx) || a_height[x + dx * 3] > (a_height[x] + dy)))) { ho_bitmap_draw_vline (m_out, x, 0, m_out->height); } } m_temp = ho_bitmap_hlink (m_out, dx * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_x; int min_x_start; x = 1; for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, m_temp->height - 2); x++) ; while (x < m_temp->width) { /* get start&end of notch line */ min_x = x - 1; min_x_start = min_x; for (; x < m_temp->width && ho_bitmap_get (m_temp, x, m_temp->height - 2); x++) { if (a_height[min_x] >= a_height[x]) min_x = x; if (a_height[min_x_start] > a_height[x]) min_x_start = x; } /* draw line on minimal interfont space */ ho_bitmap_draw_vline (m_out, (min_x_start + min_x) / 2, 0, m_out->height); for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, m_temp->height - 2); x++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_edges_bottom_big (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 10; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* get the fill of the font */ a_height = (int *) calloc (m_text->width, sizeof (int)); if (!a_height) return NULL; /* set y start and y end */ dy = threshold * line_height / 100; y1 = y_start + line_height - line_height / 2 - 3; y2 = y_start + line_height + line_height / 6 + 3; if (y2 > m_text->height - 1) y2 = m_text->height - 1; dx = m_text->width / 20 + 1; x1 = dx + 1; x2 = m_text->width - x1; for (x = 0; x < m_text->width; x++) { for (y = y2; y > y1 && !ho_bitmap_get (m_text, x, y); y--) ; a_height[x] = (y2 - y); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (x = 0; x < m_out->width; x++) { if (((x < dx || a_height[x - dx] > a_height[x] + dy) && (x > m_out->width - dx || a_height[x + dx] > a_height[x] + dy)) || ((x < 2 * dx || a_height[x - dx * 2] > a_height[x] + dy) && (x > m_out->width - 2 * dx || a_height[x + dx * 2] > a_height[x] + dy)) || ((x < 3 * dx || a_height[x - dx * 3] > a_height[x] + dy) && (x > m_out->width - 3 * dx || a_height[x + dx * 3] > a_height[x] + dy))) { ho_bitmap_draw_vline (m_out, x, 0, m_out->height); } } m_temp = ho_bitmap_hlink (m_out, dx * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_x; int min_x_start; x = 1; for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, m_temp->height - 2); x++) ; while (x < m_temp->width) { /* get start&end of notch line */ min_x = x - 1; min_x_start = min_x; for (; x < m_temp->width && ho_bitmap_get (m_temp, x, m_temp->height - 2); x++) { if (a_height[min_x] >= a_height[x]) min_x = x; if (a_height[min_x_start] > a_height[x]) min_x_start = x; } /* draw line on minimal interfont space */ ho_bitmap_draw_vline (m_out, (min_x_start + min_x) / 2, 0, m_out->height); for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, m_temp->height - 2); x++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_edges_left (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 3; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* set y start and y end */ dx = threshold * line_height / 100; x1 = 0; x2 = 3 * m_text->width / 4 + 1; dy = line_height / 20 + 1; y1 = y_start; y2 = y_start + line_height + 1; if (y2 > m_text->height) y2 = m_text->height; /* get the fill of the font */ a_height = (int *) calloc (line_height + 1, sizeof (int)); if (!a_height) return NULL; for (y = y1; y < y2; y++) { for (x = x1; x < x2 && !ho_bitmap_get (m_text, x, y); x++) ; a_height[y - y1] = (x - x1); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (y = y1; y < y2 && y < m_out->height; y++) { if (((y < y1 + dy || a_height[y - dy - y1] > a_height[y - y1] + dx) && (y > y2 - dy || a_height[y + dy - y1] > a_height[y - y1] + dx)) || ((y < y1 + 2 * dy || a_height[y - dy * 2 - y1] > a_height[y - y1] + dx) && (y > y2 - 2 * dy || a_height[y + dy * 2 - y1] > a_height[y - y1] + dx)) || ((y < y1 + 3 * dy || a_height[y - dy * 3 - y1] > a_height[y - y1] + dx) && (y > y2 - 3 * dy || a_height[y + dy * 3 - y1] > a_height[y - y1] + dx))) { ho_bitmap_draw_hline (m_out, 0, y, m_out->width); } } m_temp = ho_bitmap_vlink (m_out, dy * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_y; int min_y_start; y = y1 + 1; for (; y < y2 && !ho_bitmap_get (m_temp, 1, y); y++) ; while (y < y2) { /* get start&end of notch line */ min_y = y - 1; min_y_start = min_y; for (; y < y2 && ho_bitmap_get (m_temp, 1, y); y++) { if (a_height[min_y - y1] >= a_height[y - y1]) min_y = y; if (a_height[min_y_start - y1] > a_height[y - y1]) min_y_start = y; } /* draw line on minimal interfont space */ ho_bitmap_draw_hline (m_out, 0, (min_y_start + min_y) / 2, m_out->width); for (; y < y2 && !ho_bitmap_get (m_temp, 1, y); y++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_edges_left_big (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 10; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* set y start and y end */ dx = threshold * line_height / 100; x1 = 0; x2 = 3 * m_text->width / 4 + 1; dy = line_height / 20 + 1; y1 = y_start; y2 = y_start + line_height + 1; if (y2 > m_text->height) y2 = m_text->height; /* get the fill of the font */ a_height = (int *) calloc (line_height + 1, sizeof (int)); if (!a_height) return NULL; for (y = y1; y < y2; y++) { for (x = x1; x < x2 && !ho_bitmap_get (m_text, x, y); x++) ; a_height[y - y1] = (x - x1); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (y = y1; y < y2 && y < m_out->height; y++) { if (((y < y1 + dy || a_height[y - dy - y1] > a_height[y - y1] + dx) && (y > y2 - dy || a_height[y + dy - y1] > a_height[y - y1] + dx)) || ((y < y1 + 2 * dy || a_height[y - dy * 2 - y1] > a_height[y - y1] + dx) && (y > y2 - 2 * dy || a_height[y + dy * 2 - y1] > a_height[y - y1] + dx)) || ((y < y1 + 3 * dy || a_height[y - dy * 3 - y1] > a_height[y - y1] + dx) && (y > y2 - 3 * dy || a_height[y + dy * 3 - y1] > a_height[y - y1] + dx))) { ho_bitmap_draw_hline (m_out, 0, y, m_out->width); } } m_temp = ho_bitmap_vlink (m_out, dy * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_y; int min_y_start; y = y1 + 1; for (; y < y2 && !ho_bitmap_get (m_temp, 1, y); y++) ; while (y < y2) { /* get start&end of notch line */ min_y = y - 1; min_y_start = min_y; for (; y < y2 && ho_bitmap_get (m_temp, 1, y); y++) { if (a_height[min_y - y1] >= a_height[y - y1]) min_y = y; if (a_height[min_y_start - y1] > a_height[y - y1]) min_y_start = y; } /* draw line on minimal interfont space */ ho_bitmap_draw_hline (m_out, 0, (min_y_start + min_y) / 2, m_out->width); for (; y < y2 && !ho_bitmap_get (m_temp, 1, y); y++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_edges_right (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 5; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* set y start and y end */ dx = threshold * m_text->width / 100; x1 = m_text->width - 3 * m_text->width / 4 - 1; x2 = m_text->width; dy = line_height / 20 + 1; y1 = y_start; y2 = y_start + line_height + 1; if (y2 > m_text->height) y2 = m_text->height; /* get the fill of the font */ a_height = (int *) calloc (line_height + 1, sizeof (int)); if (!a_height) return NULL; for (y = y1; y < y2; y++) { for (x = x2 - 1; x >= x1 && !ho_bitmap_get (m_text, x, y); x--) ; a_height[y - y1] = (x2 - x); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (y = y1; y < y2; y++) { if (((y < y1 + dy || a_height[y - dy - y1] > a_height[y - y1] + dx) && (y > y2 - dy || a_height[y + dy - y1] > a_height[y - y1] + dx)) || ((y < y1 + 2 * dy || a_height[y - dy * 2 - y1] > a_height[y - y1] + dx) && (y > y2 - 2 * dy || a_height[y + dy * 2 - y1] > a_height[y - y1] + dx)) || ((y < y1 + 3 * dy || a_height[y - dy * 3 - y1] > a_height[y - y1] + dx) && (y > y2 - 3 * dy || a_height[y + dy * 3 - y1] > a_height[y - y1] + dx))) { ho_bitmap_draw_hline (m_out, 0, y, m_text->width); } } m_temp = ho_bitmap_vlink (m_out, dy * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_y; int min_y_start; y = y1 + 1; for (; y < y2 && !ho_bitmap_get (m_temp, 2, y); y++) ; while (y < y2) { /* get start&end of notch line */ min_y = y - 2; min_y_start = min_y; for (; y < y2 && ho_bitmap_get (m_temp, 2, y); y++) { if (a_height[min_y - y1] >= a_height[y - y1]) min_y = y; if (a_height[min_y_start - y1] > a_height[y - y1]) min_y_start = y; } /* draw line on minimal interfont space */ ho_bitmap_draw_hline (m_out, 0, (min_y_start + min_y) / 2, m_out->width); for (; y < y2 && !ho_bitmap_get (m_temp, 2, y); y++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_edges_right_big (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 10; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* set y start and y end */ dx = threshold * m_text->width / 100; x1 = m_text->width - 3 * m_text->width / 4 - 1; x2 = m_text->width; dy = line_height / 20 + 1; y1 = y_start; y2 = y_start + line_height + 1; if (y2 > m_text->height) y2 = m_text->height; /* get the fill of the font */ a_height = (int *) calloc (line_height + 1, sizeof (int)); if (!a_height) return NULL; for (y = y1; y < y2; y++) { for (x = x2 - 1; x >= x1 && !ho_bitmap_get (m_text, x, y); x--) ; a_height[y - y1] = (x2 - x); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (y = y1; y < y2; y++) { if (((y < y1 + dy || a_height[y - dy - y1] > a_height[y - y1] + dx) && (y > y2 - dy || a_height[y + dy - y1] > a_height[y - y1] + dx)) || ((y < y1 + 2 * dy || a_height[y - dy * 2 - y1] > a_height[y - y1] + dx) && (y > y2 - 2 * dy || a_height[y + dy * 2 - y1] > a_height[y - y1] + dx)) || ((y < y1 + 3 * dy || a_height[y - dy * 3 - y1] > a_height[y - y1] + dx) && (y > y2 - 3 * dy || a_height[y + dy * 3 - y1] > a_height[y - y1] + dx))) { ho_bitmap_draw_hline (m_out, 0, y, m_text->width); } } m_temp = ho_bitmap_vlink (m_out, dy * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_y; int min_y_start; y = y1 + 1; for (; y < y2 && !ho_bitmap_get (m_temp, 2, y); y++) ; while (y < y2) { /* get start&end of notch line */ min_y = y - 2; min_y_start = min_y; for (; y < y2 && ho_bitmap_get (m_temp, 2, y); y++) { if (a_height[min_y - y1] >= a_height[y - y1]) min_y = y; if (a_height[min_y_start - y1] > a_height[y - y1]) min_y_start = y; } /* draw line on minimal interfont space */ ho_bitmap_draw_hline (m_out, 0, (min_y_start + min_y) / 2, m_out->width); for (; y < y2 && !ho_bitmap_get (m_temp, 2, y); y++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_notch_top (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 0; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* get the fill of the font */ a_height = (int *) calloc (m_text->width, sizeof (int)); if (!a_height) return NULL; /* set y start and y end */ dy = threshold * line_height / 100 + 1; y1 = y_start - line_height / 6 - 3; y2 = y_start + line_height / 2 + 3; if (y1 < 0) y1 = 0; dx = m_text->width / 30 + 3; x1 = dx + 1; x2 = m_text->width - x1; for (x = 0; x < m_text->width; x++) { for (y = y1; y < y2 && !ho_bitmap_get (m_text, x, y); y++) ; a_height[x] = (y - y1); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (x = 0; x < m_out->width; x++) { if (((x > dx && a_height[x - dx] < a_height[x] - dy) && (x < m_out->width - dx && a_height[x + dx] < a_height[x] - dy)) || ((x > 2 * dx && a_height[x - dx * 2] < a_height[x] - dy) && (x < m_out->width - 2 * dx && a_height[x + dx * 2] < a_height[x] - dy))) { ho_bitmap_draw_vline (m_out, x, 0, y_start); } } m_temp = ho_bitmap_hlink (m_out, dx * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_x; int min_x_start; x = 1; for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, 2); x++) ; while (x < m_temp->width) { /* get start&end of notch line */ min_x = x - 1; min_x_start = min_x; for (; x < m_temp->width && ho_bitmap_get (m_temp, x, 2); x++) { if (a_height[min_x] <= a_height[x]) min_x = x; if (a_height[min_x_start] < a_height[x]) min_x_start = x; } /* draw line on minimal interfont space */ ho_bitmap_draw_vline (m_out, (min_x_start + min_x) / 2, 0, m_out->height); for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, 2); x++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_notch_bottom (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; ho_bitmap *m_clean = NULL; int *a_height; int dx, dy; int i, x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 2; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* get the fill of the font */ a_height = (int *) calloc (m_text->width, sizeof (int)); if (!a_height) return NULL; /* set y start and y end */ dy = threshold * line_height / 100 + 1; y1 = y_start + line_height - line_height / 2 - 3; y2 = y_start + line_height + line_height / 6 + 3; if (y2 > m_text->height - 1) y2 = m_text->height - 1; dx = m_text->width / 30 + 3; x1 = dx + 1; x2 = m_text->width - x1; for (x = 0; x < m_text->width; x++) { for (y = y2; y > y1 && !ho_bitmap_get (m_text, x, y); y--) ; a_height[x] = (y2 - y); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (x = 0; x < m_out->width; x++) { if (((x > dx && a_height[x - dx] < a_height[x] - dy) && (x < m_out->width - dx && a_height[x + dx] < a_height[x] - dy)) || ((x > 2 * dx && a_height[x - dx * 2] < a_height[x] - dy) && (x < m_out->width - 2 * dx && a_height[x + dx * 2] < a_height[x] - dy))) { ho_bitmap_draw_vline (m_out, x, 0, m_out->height); } } m_temp = ho_bitmap_hlink (m_out, dx * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_x; int min_x_start; x = 1; for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, m_temp->height - 2); x++) ; while (x < m_temp->width) { /* get start&end of notch line */ min_x = x - 1; min_x_start = min_x; for (; x < m_temp->width && ho_bitmap_get (m_temp, x, m_temp->height - 2); x++) { if (a_height[min_x] <= a_height[x]) min_x = x; if (a_height[min_x_start] < a_height[x]) min_x_start = x; } /* draw line on minimal interfont space */ ho_bitmap_draw_vline (m_out, (min_x_start + min_x) / 2, 0, m_out->height); for (; x < m_temp->width && !ho_bitmap_get (m_temp, x, m_temp->height - 2); x++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_notch_left (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 0; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* set y start and y end */ dx = threshold * line_height / 100 + 1; x1 = 0; x2 = 3 * m_text->width / 4 + 1; dy = line_height / 10 + 2; y1 = y_start; y2 = y_start + line_height + 1; if (y2 > m_text->height) y2 = m_text->height; /* get the fill of the font */ a_height = (int *) calloc (line_height + 1, sizeof (int)); if (!a_height) return NULL; for (y = y1; y < y2; y++) { for (x = x1; x < x2 && !ho_bitmap_get (m_text, x, y); x++) ; a_height[y - y1] = (x - x1); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (y = y1; y < y2 && y < m_out->height; y++) { if (((y > (y1 + dy) && a_height[y - dy - y1] < (a_height[y - y1] - dx)) && (y < (y2 - dy) && a_height[y + dy - y1] < (a_height[y - y1] - dx))) || ((y > (y1 + 2 * dy) && a_height[y - dy * 2 - y1] < (a_height[y - y1] - dx)) && (y < (y2 - 2 * dy) && a_height[y + dy * 2 - y1] < (a_height[y - y1] - dx)))) { ho_bitmap_draw_hline (m_out, 0, y, m_out->width); } } m_temp = ho_bitmap_vlink (m_out, dy * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_y; int min_y_start; y = y1 + 1; for (; y < y2 && !ho_bitmap_get (m_temp, 1, y); y++) ; while (y < y2) { /* get start&end of notch line */ min_y = y - 1; min_y_start = min_y; for (; y < y2 && ho_bitmap_get (m_temp, 1, y); y++) { if (a_height[min_y - y1] <= a_height[y - y1]) min_y = y; if (a_height[min_y_start - y1] < a_height[y - y1]) min_y_start = y; } /* draw line on minimal interfont space */ ho_bitmap_draw_hline (m_out, 0, (min_y_start + min_y) / 2, m_out->width); for (; y < y2 && !ho_bitmap_get (m_temp, 1, y); y++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } ho_bitmap * ho_font_notch_right (const ho_bitmap * m_text, const ho_bitmap * m_mask) { ho_bitmap *m_out = NULL; ho_bitmap *m_temp = NULL; int *a_height; int dx, dy; int x, y, line_height, y_start; int y1, y2, x1, x2; int threshold = 0; int sum; /* get font start and end */ sum = 0; for (y = 0; y < m_mask->height && sum == 0; y++) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); y_start = y - 1; sum = 0; for (y = m_mask->height - 1; y > y_start && sum == 0; y--) for (sum = 0, x = 0; x < m_mask->width; x++) sum += ho_bitmap_get (m_text, x, y); line_height = y - y_start + 1; if (!line_height || m_mask->width < 2) return NULL; /* set y start and y end */ dx = threshold * m_text->width / 100 + 1; x1 = m_text->width - 3 * m_text->width / 4 - 1; x2 = m_text->width; dy = line_height / 10 + 2; y1 = y_start; y2 = y_start + line_height + 1; if (y2 > m_text->height) y2 = m_text->height; /* get the fill of the font */ a_height = (int *) calloc (line_height + 1, sizeof (int)); if (!a_height) return NULL; for (y = y1; y < y2; y++) { for (x = x2 - 1; x >= x1 && !ho_bitmap_get (m_text, x, y); x--) ; a_height[y - y1] = (x2 - x); } /* allocate bitmap output */ m_out = ho_bitmap_new (m_text->width, m_text->height); if (!m_out) return NULL; /* set lines where it looks like a notch */ for (y = y1; y < y2 && y < m_out->height; y++) { if (((y > y1 + dy && a_height[y - dy - y1] < a_height[y - y1] - dx) && (y < y2 - dy && a_height[y + dy - y1] < a_height[y - y1] - dx)) || ((y > y1 + 2 * dy && a_height[y - dy * 2 - y1] < a_height[y - y1] - dx) && (y < y2 - 2 * dy && a_height[y + dy * 2 - y1] < a_height[y - y1] - dx))) { ho_bitmap_draw_hline (m_out, 0, y, m_out->width); } } m_temp = ho_bitmap_vlink (m_out, dy * 2); ho_bitmap_free (m_out); /* thin notch lines to one line per font */ m_out = ho_bitmap_new (m_temp->width, m_temp->height); if (!m_out) return NULL; { int min_y; int min_y_start; y = y1 + 1; for (; y < y2 && !ho_bitmap_get (m_temp, 2, y); y++) ; while (y < y2) { /* get start&end of notch line */ min_y = y - 2; min_y_start = min_y; for (; y < y2 && ho_bitmap_get (m_temp, 2, y); y++) { if (a_height[min_y - y1] <= a_height[y - y1]) min_y = y; if (a_height[min_y_start - y1] < a_height[y - y1]) min_y_start = y; } /* draw line on minimal interfont space */ ho_bitmap_draw_hline (m_out, 0, (min_y_start + min_y) / 2, m_out->width); for (; y < y2 && !ho_bitmap_get (m_temp, 2, y); y++) ; } } free (a_height); ho_bitmap_free (m_temp); /* fix the x and y of the output bitmap */ m_out->x = m_text->x; m_out->y = m_text->y; return m_out; } int ho_font_pnm_save (const ho_bitmap * m_text, const ho_bitmap * m_nikud, const ho_bitmap * m_mask, const char *filename) { FILE *file = NULL; ho_pixbuf *pix = NULL; int x, y; unsigned char red, green, blue; /* create pixbuf */ pix = ho_pixbuf_new (3, m_text->width, m_text->height, 0); if (!pix) return TRUE; /* fill the pixbuf */ for (x = 0; x < m_text->width; x++) for (y = 0; y < m_text->height; y++) { red = ho_bitmap_get (m_text, x, y) * 255; green = ho_bitmap_get (m_nikud, x, y) * 255; blue = ho_bitmap_get (m_mask, x, y) * 255; ho_pixbuf_set (pix, x, y, 0, red); ho_pixbuf_set (pix, x, y, 1, green); ho_pixbuf_set (pix, x, y, 2, blue); } /* open file for writing */ file = fopen (filename, "wb"); if (!file) { ho_pixbuf_free (pix); return TRUE; } /* print header */ fprintf (file, "P6 %d %d 255\n", pix->width, pix->height); /* this might be a huge write... */ fwrite (pix->data, 1, pix->height * pix->rowstride, file); fclose (file); ho_pixbuf_free (pix); return FALSE; } int ho_font_pnm_load (ho_bitmap ** m_text, ho_bitmap ** m_nikud, ho_bitmap ** m_mask, const char *filename) { ho_pixbuf *pix = NULL; int x, y; unsigned char red, green, blue; /* load pix from file */ pix = ho_pixbuf_pnm_load (filename); if (!pix) return TRUE; if (pix->n_channels != 3) { ho_pixbuf_free (pix); return TRUE; } /* allocate the font bitmaps */ (*m_text) = ho_bitmap_new (pix->width, pix->height); (*m_nikud) = ho_bitmap_new (pix->width, pix->height); (*m_mask) = ho_bitmap_new (pix->width, pix->height); /* set contents */ for (x = 0; x < (*m_text)->width; x++) for (y = 0; y < (*m_text)->height; y++) { red = ho_pixbuf_get (pix, x, y, 0); green = ho_pixbuf_get (pix, x, y, 1); blue = ho_pixbuf_get (pix, x, y, 2); if (red) ho_bitmap_set ((*m_text), x, y); if (green) ho_bitmap_set ((*m_nikud), x, y); if (blue) ho_bitmap_set ((*m_mask), x, y); } ho_pixbuf_free (pix); return FALSE; } ho_bitmap * ho_font_filter (const ho_bitmap * m_text, const ho_bitmap * m_mask, int filter_index) { ho_bitmap *m_out = NULL; switch (filter_index) { case 1: m_out = ho_font_main_sign (m_text, m_mask); break; case 2: m_out = ho_font_second_object (m_text, m_mask); break; case 3: m_out = ho_font_holes (m_text, m_mask); break; case 4: m_out = ho_font_hbars (m_text, m_mask); break; case 5: m_out = ho_font_vbars (m_text, m_mask); break; case 6: m_out = ho_font_diagonal (m_text, m_mask); break; case 7: m_out = ho_font_diagonal_left (m_text, m_mask); break; case 8: m_out = ho_font_thin (m_text, m_mask); break; case 9: m_out = ho_font_cross (m_text, m_mask); break; case 10: m_out = ho_font_ends (m_text, m_mask); break; case 11: m_out = ho_font_edges_top (m_text, m_mask); break; case 12: m_out = ho_font_edges_top_big (m_text, m_mask); break; case 13: m_out = ho_font_edges_bottom (m_text, m_mask); break; case 14: m_out = ho_font_edges_bottom_big (m_text, m_mask); break; case 15: m_out = ho_font_edges_left (m_text, m_mask); break; case 16: m_out = ho_font_edges_left_big (m_text, m_mask); break; case 17: m_out = ho_font_edges_right (m_text, m_mask); break; case 18: m_out = ho_font_edges_right_big (m_text, m_mask); break; case 19: m_out = ho_font_notch_top (m_text, m_mask); break; case 20: m_out = ho_font_notch_bottom (m_text, m_mask); break; case 21: m_out = ho_font_notch_left (m_text, m_mask); break; case 22: m_out = ho_font_notch_right (m_text, m_mask); break; default: m_out = NULL; break; } return m_out; } ho_bitmap * ho_font_holes_filter (const ho_bitmap * m_text, const ho_bitmap * m_mask, int filter_index) { ho_bitmap *m_out = NULL; ho_bitmap *m_holes = NULL; m_holes = ho_font_holes (m_text, m_mask); if (!m_holes) return NULL; /* TODO: set width of holes bitmap */ m_out = ho_font_filter (m_holes, m_mask, filter_index); ho_bitmap_free (m_holes); return m_out; } libhocr-0.10.17/src/ho_recognize_nikud.c0000644000175000017500000003351711024437737015044 00000000000000 /*************************************************************************** * ho_recognize_nikud.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" #include "ho_segment.h" #include "ho_font.h" #include "ho_recognize_nikud.h" int ho_recognize_nikud_array_in_size () { return HO_NIKUD_ARRAY_IN_SIZE; } int ho_recognize_nikud_array_out_size () { return HO_NIKUD_ARRAY_OUT_SIZE; } int ho_recognize_nikud_dimentions (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *height, double *width, double *top, double *bottom, double *top_left, double *top_mid, double *top_right, double *mid_left, double *mid_right, double *bottom_left, double *bottom_mid, double *bottom_right, double *dots_above, double *dots_below, double *dots_inside, double *objs_above, double *objs_below, double *objs_inside, double *main_obj_height, double *main_obj_width, double *top_dot_x, double *inside_dot_x, double *font_width_by_height) { int i, x, y; int obj_width, obj_height; int obj_x, obj_y; int obj_w, obj_h; int line_start, line_end, line_height; int sum, font_start_x, font_end_x, font_height, font_width; int font_start_y, font_end_y; ho_objmap *o_obj = NULL; unsigned char is_dot, is_obj; /* init values to zero */ *height = 0.0; *width = 0.0; *top = 0.0; *bottom = 0.0; *top_left = 0.0; *top_mid = 0.0; *top_right = 0.0; *mid_left = 0.0; *mid_right = 0.0; *bottom_left = 0.0; *bottom_mid = 0.0; *bottom_right = 0.0; *dots_above = 0.0; *dots_below = 0.0; *dots_inside = 0.0; *objs_above = 0.0; *objs_below = 0.0; *objs_inside = 0.0; *top_dot_x = 0.0; *inside_dot_x = 0.0; *font_width_by_height = 0.0; /* get line start and end */ x = m_mask->width / 2; for (y = 0; y < m_mask->height && !ho_bitmap_get (m_mask, x, y); y++) ; line_start = y - 1; for (; y < m_mask->height && ho_bitmap_get (m_mask, x, y); y++) ; line_end = y; line_height = line_end - line_start; if (line_height < 4 || m_text->width < 4) return TRUE; *font_width_by_height = (double) m_mask->width / (double) line_height; /* get all the objects of nikud */ o_obj = ho_objmap_new_from_bitmap (m_text); if (!o_obj) return TRUE; /* if no nikud just return */ if (ho_objmap_get_size (o_obj) == 0) { ho_objmap_free (o_obj); return FALSE; } /* count points and objects above/in/below font */ obj_x = 0; obj_y = 0; obj_w = 0; obj_h = 0; for (i = 0; i < ho_objmap_get_size (o_obj); i++) { /* is this object inside line ? */ y = ho_objmap_get_object (o_obj, i).y; x = ho_objmap_get_object (o_obj, i).x; obj_width = ho_objmap_get_object (o_obj, i).width; obj_height = ho_objmap_get_object (o_obj, i).height; is_dot = (obj_height < line_height / 4 && obj_height > line_height / 16 && obj_width < line_height / 4 && obj_width > line_height / 16); is_obj = (obj_height > line_height / 4 || obj_width > line_height / 4); if (is_dot) { /* count */ if ((y + obj_height / 2) < line_start) { (*dots_above) += 0.1; *top_dot_x = (double) x / (double) (m_text->width); } else if ((y + obj_height / 2) > line_end) { (*dots_below) += 0.1; } else { (*dots_inside) += 0.1; *inside_dot_x = (double) x / (double) (m_text->width); } } else if (is_obj) { /* count */ if ((y + obj_height / 2) < line_start) { (*objs_above) += 0.1; } else if ((y + obj_height / 2) > line_end) { (*objs_below) += 0.1; /* get metrics of bigest obj under font */ if (obj_width > *width) { obj_x = x; obj_y = y; obj_w = obj_width; obj_h = obj_height; } } else { (*objs_inside) += 0.1; } } } /* free obj map */ ho_objmap_free (o_obj); /* if nothing below font we are finished */ if (!(*objs_below) && !(*dots_below)) return FALSE; /* get nikud metrics */ *main_obj_height = 2.0 * (double) obj_h / (double) line_height; *main_obj_width = 2.0 * (double) obj_w / (double) line_height; if (obj_y && obj_h) { *top = 2.0 * (double) (obj_y - line_end) / (double) line_height; *bottom = 2.0 * (double) ((obj_y + obj_h) - line_end) / (double) line_height; } /* get nikud start and end */ sum = 0; for (y = line_end + 1; y < m_text->height && sum == 0; y++) for (sum = 0, x = 1; x < (m_text->width - 1); x++) sum += ho_bitmap_get (m_text, x, y); font_start_y = y - 1; sum = 0; for (y = m_text->height - 1; y > font_start_y && sum == 0; y--) for (sum = 0, x = 1; x < (m_text->width - 1); x++) sum += ho_bitmap_get (m_text, x, y); font_end_y = y + 1; font_height = font_end_y - font_start_y; if (!font_height) return TRUE; *height = 2.0 * (double) font_height / (double) line_height; sum = 0; for (x = 2; x < m_text->width && sum == 0; x++) for (sum = 0, y = line_end; y < (m_text->height - 1); y++) sum += ho_bitmap_get (m_text, x, y); font_start_x = x - 1; sum = 0; for (sum = 0, x = m_text->width - 2; x > (font_start_x + 1) && sum == 0; x--) for (sum = 0, y = line_end; y < (m_text->height - 1); y++) sum += ho_bitmap_get (m_text, x, y); font_end_x = x + 1; font_width = font_end_x - font_start_x; if (!font_width) return TRUE; *width = 2.0 * (double) font_width / (double) line_height; /* get nikud egdes */ for (y = font_start_y, x = font_start_x; x < font_end_x && y < (font_end_y) && !ho_bitmap_get (m_text, x, y); x++, y++) ; *top_left = (double) (x - font_start_x) / (double) (line_height / 4); if (*top_left > 1.0) *top_left = 1.0; for (y = font_end_y, x = font_start_x; x < font_end_x && y > (font_start_y) && !ho_bitmap_get (m_text, x, y); x++, y--) ; *bottom_left = (double) (x - font_start_x) / (double) (line_height / 4); if (*bottom_left > 1.0) *bottom_left = 1.0; for (y = font_start_y, x = font_end_x - 1; x > font_start_x && y < (font_end_y) && !ho_bitmap_get (m_text, x, y); x--, y++) ; *top_right = (double) (font_end_x - x) / (double) (line_height / 4); if (*top_right > 1.0) *top_right = 1.0; for (y = font_end_y, x = font_end_x - 1; x > font_start_x && y > font_start_y && !ho_bitmap_get (m_text, x, y); x--, y--) ; *bottom_right = (double) (font_end_x - x) / (double) (line_height / 4); if (*bottom_right > 1.0) *bottom_right = 1.0; for (y = font_start_y, x = font_start_x + font_width / 2; y < (font_start_y + font_height) && !ho_bitmap_get (m_text, x, y); y++) ; *top_mid = (double) (y - font_start_y) / (double) (line_height / 4); if (*top_mid > 1.0) *top_mid = 1.0; for (y = font_end_y, x = font_start_x + font_width / 2; y > (font_start_y + font_height) && !ho_bitmap_get (m_text, x, y); y--) ; *bottom_mid = (double) (font_end_y - y) / (double) (line_height / 4); if (*bottom_mid > 1.0) *bottom_mid = 1.0; for (y = font_start_y + font_height / 2, x = font_start_x; x < (font_end_x) && !ho_bitmap_get (m_text, x, y); x++) ; *mid_left = (double) (x - font_start_x) / (double) (line_height / 4); if (*mid_left > 1.0) *mid_left = 1.0; for (y = font_start_y + font_height / 2, x = font_end_x - 1; x > (font_start_x) && !ho_bitmap_get (m_text, x, y); x--) ; *mid_right = (double) (font_end_x - x) / (double) (line_height / 4); if (*mid_right > 1.0) *mid_right = 1.0; return FALSE; } int ho_recognize_nikud_array_in (const ho_bitmap * m_nikud, const ho_bitmap * m_mask, double *array_in) { double height; double width; double top; double bottom; double top_left; double top_mid; double top_right; double mid_left; double mid_right; double bottom_left; double bottom_mid; double bottom_right; double dots_above; double dots_below; double dots_inside; double objs_above; double objs_below; double objs_inside; double main_obj_height; double main_obj_width; double top_dot_x; double inside_dot_x; double font_width_by_height; ho_recognize_nikud_dimentions (m_nikud, m_mask, &height, &width, &top, &bottom, &top_left, &top_mid, &top_right, &mid_left, &mid_right, &bottom_left, &bottom_mid, &bottom_right, &dots_above, &dots_below, &dots_inside, &objs_above, &objs_below, &objs_inside, &main_obj_height, &main_obj_width, &top_dot_x, &inside_dot_x, &font_width_by_height); array_in[0] = height; array_in[1] = width; if (height) array_in[2] = width / height; else array_in[2] = 0.0; if (array_in[2] > 1.0) array_in[2] = 1.0; array_in[3] = top; array_in[4] = bottom; array_in[5] = top_left; array_in[6] = top_mid; array_in[7] = top_right; array_in[8] = mid_left; array_in[9] = mid_right; array_in[10] = bottom_left; array_in[11] = bottom_mid; array_in[12] = bottom_right; array_in[13] = dots_above; array_in[14] = dots_inside; array_in[15] = dots_below; array_in[16] = objs_above; array_in[17] = objs_inside; array_in[18] = objs_below; array_in[19] = main_obj_width; array_in[20] = main_obj_height; array_in[21] = top_dot_x; array_in[22] = inside_dot_x; array_in[23] = font_width_by_height; return 0; } int ho_recognize_nikud_array_out (const double *array_in, double *array_out, int font_code) { int i; /* set array out */ array_out[0] = 0.1; for (i = 1; i < HO_NIKUD_ARRAY_OUT_SIZE; i++) array_out[i] = 0.0; /* one dot above line */ if (array_in[13] == 0.1) { if (array_in[23] < 0.53) { /* holam */ array_out[5] = 1.0; } else { if (array_in[21] > 0.5) { /* shin */ array_out[14] = -1.0; } else { /* sin */ array_out[15] = -1.0; } } } /* dot inside font */ if (array_in[14] == 0.1) { if (array_in[23] < 0.53) { /* shorok */ array_out[6] = 1.0; } else { /* dagesh */ array_out[13] = -1.0; } } /* two dots inside */ if (array_in[14] > 0.1 && array_in[14] < 0.3) { /* shva */ array_out[9] = 1.0; } /* one obj below line */ if (array_in[18] == 0.1 && array_in[15] == 0.0) { if (array_in[1] > (1.8 * array_in[0])) { if (array_in[6] > 0.25) { /* tzere */ array_out[3] = 1.0; } else { /* patach */ array_out[2] = 1.0; } } else if (array_in[0] > (1.8 * array_in[1])) { /* shva */ array_out[9] = 1.0; } else { if (array_in[12] > 0.1) { if (array_in[6] < 0.2) { /* kamatz */ array_out[1] = 1.0; } else { /* segul */ array_out[4] = 1.0; } } else { /* kobotz */ array_out[7] = 1.0; } } } /* one dot below line */ if (array_in[15] > 0.0 && array_in[15] < 0.2 && array_in[18] == 0.0) { /* hirik */ array_out[8] = 1.0; } /* two dots */ if (array_in[15] > 0.1 && array_in[15] < 0.3) { if (array_in[18] != 0.1) { if (array_in[1] > (1.8 * array_in[0]) && array_in[1] > 0.65) { /* tzere */ array_out[3] = 1.0; } else { /* shva */ array_out[9] = 1.0; } } else /* hataf */ { if (array_in[19] > (2.0 * array_in[20])) { /* hataf patach */ array_out[11] = 1.0; } else { /* hataf kamatz */ array_out[12] = 1.0; } } } /* three dots */ if (array_in[15] > 0.2 && array_in[15] < 0.4) { if (array_in[11] > 0.1 || array_in[7] > 0.5) { /* kobotz */ array_out[7] = 1.0; } else { /* segul */ array_out[4] = 1.0; } } /* five dots */ if (array_in[15] > 0.4 && array_in[15] < 0.6) { /* hataf segul */ array_out[10] = 1.0; } return FALSE; } const char * ho_recognize_array_out_to_nikud (const double *array_out) { int i = 0; int max_i = 0; /* find the font with hiegher score */ for (i = 1; i < HO_NIKUD_ARRAY_OUT_SIZE; i++) if (array_out[i] > array_out[max_i]) max_i = i; return ho_nikud_array[max_i]; } const char * ho_recognize_nikud (const ho_bitmap * m_nikud, const ho_bitmap * m_mask, int font_code, const char **dagesh, const char **shin) { double array_in[HO_NIKUD_ARRAY_IN_SIZE]; double array_out[HO_NIKUD_ARRAY_OUT_SIZE]; const char *font; *dagesh = ho_nikud_array[0]; *shin = ho_nikud_array[0]; ho_recognize_nikud_array_in (m_nikud, m_mask, array_in); ho_recognize_nikud_array_out (array_in, array_out, font_code); font = ho_recognize_array_out_to_nikud (array_out); /* dagesh */ if (array_out[13] == -1.0) *dagesh = ho_nikud_array[13]; /* shin */ if (array_out[14] == -1.0) *shin = ho_nikud_array[14]; if (array_out[15] == -1.0) *shin = ho_nikud_array[15]; return font; } libhocr-0.10.17/src/ho_string.c0000644000175000017500000001104311017002614013141 00000000000000 /*************************************************************************** * ho_string.c * * Sat Dec 10 21:00:29 2005 * Copyright 2005 Yacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_string.h" /* * how much memory (bytes) hocr_string_buffer will * allocate when it nead new memory */ #define MEMORY_CHANK_FOR_TEXT_BUFFER 500 /* * internal string_buffer stractures */ ho_string * ho_string_new () { ho_string *new_string_buffer; /* allocate memory for struct */ new_string_buffer = (ho_string *) malloc (sizeof (ho_string)); /* check for new memory */ if (!new_string_buffer) return NULL; /* init struct values */ new_string_buffer->size = 0; new_string_buffer->allocated_size = MEMORY_CHANK_FOR_TEXT_BUFFER; /* allocate memory for string */ new_string_buffer->string = (char *) malloc (sizeof (char) * new_string_buffer->allocated_size); /* if no memeory for string free the struct (no need for it with no string) */ if (!new_string_buffer->string) { free (new_string_buffer); return NULL; } /* init the string to zero length null terminated string */ (new_string_buffer->string)[0] = '\0'; return new_string_buffer; } int ho_string_free (ho_string * string_buffer) { /* free the string */ if (string_buffer->string) free (string_buffer->string); /* free the struct */ if (string_buffer) free (string_buffer); return FALSE; } int ho_string_set (ho_string * string_buffer, const char *new_string) { int len; char *new_allocated_string = NULL; len = strlen (new_string); /* check for allocated space and try to get more memory */ new_allocated_string = (char *) malloc (sizeof (char) * (len + MEMORY_CHANK_FOR_TEXT_BUFFER)); /* got new memory */ if (new_allocated_string) { if (string_buffer->string) free (string_buffer->string); string_buffer->string = new_allocated_string; string_buffer->allocated_size = len + MEMORY_CHANK_FOR_TEXT_BUFFER; } /* did not get new memory */ else { return TRUE; } /* add the new string */ strcpy (string_buffer->string, new_string); string_buffer->size = strlen (string_buffer->string); return FALSE; } char * ho_string_get (const ho_string * s_str) { int len; char *new_allocated_string = NULL; len = strlen (s_str->string); /* try to get memory */ new_allocated_string = (char *) malloc (sizeof (char) * (len + 1)); /* got new memory */ if (!new_allocated_string) return NULL; /* add the new string */ strcpy (new_allocated_string, s_str->string); return new_allocated_string; } int ho_string_cat (ho_string * string_buffer, const char *new_string) { int len; char *new_allocated_string = NULL; len = strlen (new_string); if (len < 1) return FALSE; /* check for allocated space and try to get more memory */ if ((string_buffer->size + len) >= string_buffer->allocated_size) { new_allocated_string = realloc (string_buffer->string, sizeof (char) * (string_buffer->allocated_size + len + MEMORY_CHANK_FOR_TEXT_BUFFER)); /* got new memory */ if (new_allocated_string) { string_buffer->string = new_allocated_string; string_buffer->allocated_size += len + MEMORY_CHANK_FOR_TEXT_BUFFER; } /* did not get new memory */ else return TRUE; } /* add the new string */ strcat (string_buffer->string, new_string); string_buffer->size = strlen (string_buffer->string); return FALSE; } ho_string * ho_string_copy (const ho_string * string_buffer) { ho_string *new_string = NULL; new_string = ho_string_new (); ho_string_cat (new_string, string_buffer->string); return new_string; } libhocr-0.10.17/src/ho_layout.c0000644000175000017500000006517511051625620013175 00000000000000 /*************************************************************************** * ho_layout.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_segment.h" #include "ho_dimentions.h" #include "ho_layout.h" ho_layout * ho_layout_new (const ho_bitmap * m_page_text, const char font_spacing_code, const unsigned char type, const unsigned char dir) { ho_layout *l_new; /* allocate layout memory */ l_new = (ho_layout *) malloc (sizeof (ho_layout)); if (!l_new) { return NULL; } /* copy text bitmap into layout */ l_new->m_page_text = ho_bitmap_clone (m_page_text); if (!l_new->m_page_text) { free (l_new); return NULL; } l_new->font_spacing_code = font_spacing_code; l_new->type = type; l_new->dir = dir; /* link all pointers to NULL */ l_new->m_page_blocks_mask = NULL; l_new->n_blocks = 0; l_new->m_blocks_text = NULL; l_new->m_blocks_lines_mask = NULL; l_new->n_lines = NULL; l_new->m_lines_text = NULL; l_new->m_lines_line_mask = NULL; l_new->m_lines_words_mask = NULL; l_new->n_words = NULL; l_new->m_words_text = NULL; l_new->m_words_line_mask = NULL; l_new->m_words_font_mask = NULL; l_new->n_fonts = NULL; l_new->number_of_fonts = 0; return l_new; } int ho_layout_free (ho_layout * l_page) { int block_index, line_index, word_index; if (!l_page) return TRUE; for (block_index = 0; block_index < l_page->n_blocks; block_index++) { for (line_index = 0; line_index < l_page->n_lines[block_index]; line_index++) { for (word_index = 0; word_index < l_page->n_words[block_index][line_index]; word_index++) { /* free words bitmaps */ if (l_page->m_words_line_mask[block_index][line_index][word_index]) ho_bitmap_free (l_page-> m_words_line_mask[block_index][line_index][word_index]); if (l_page->m_words_text[block_index][line_index][word_index]) ho_bitmap_free (l_page-> m_words_text[block_index][line_index][word_index]); if (l_page->m_words_font_mask[block_index][line_index][word_index]) ho_bitmap_free (l_page-> m_words_font_mask[block_index][line_index][word_index]); } /* free lines bitmaps */ if (l_page->m_lines_words_mask[block_index][line_index]) ho_bitmap_free (l_page->m_lines_words_mask[block_index][line_index]); if (l_page->m_lines_text[block_index][line_index]) ho_bitmap_free (l_page->m_lines_text[block_index][line_index]); if (l_page->m_lines_line_mask[block_index][line_index]) ho_bitmap_free (l_page->m_lines_line_mask[block_index][line_index]); /* free words arrays */ if (l_page->m_words_font_mask[block_index][line_index]) free (l_page->m_words_font_mask[block_index][line_index]); if (l_page->m_words_text[block_index][line_index]) free (l_page->m_words_text[block_index][line_index]); if (l_page->m_words_line_mask[block_index][line_index]) free (l_page->m_words_line_mask[block_index][line_index]); /* free fonts arrays */ if (l_page->n_fonts[block_index][line_index]) free (l_page->n_fonts[block_index][line_index]); } /* free blocks bitmaps */ if (l_page->m_blocks_lines_mask[block_index]) ho_bitmap_free (l_page->m_blocks_lines_mask[block_index]); if (l_page->m_blocks_text[block_index]) ho_bitmap_free (l_page->m_blocks_text[block_index]); /* free lines arrays */ if (l_page->m_lines_words_mask[block_index]) free (l_page->m_lines_words_mask[block_index]); if (l_page->m_lines_text[block_index]) free (l_page->m_lines_text[block_index]); if (l_page->m_lines_line_mask[block_index]) free (l_page->m_lines_line_mask[block_index]); /* free words arrays */ if (l_page->n_words[block_index]) free (l_page->n_words[block_index]); if (l_page->m_words_font_mask[block_index]) free (l_page->m_words_font_mask[block_index]); if (l_page->m_words_text[block_index]) free (l_page->m_words_text[block_index]); if (l_page->m_words_line_mask[block_index]) free (l_page->m_words_line_mask[block_index]); /* free fonts arrays */ if (l_page->n_fonts[block_index]) free (l_page->n_fonts[block_index]); } /* free page bitmaps */ if (l_page->m_page_text) ho_bitmap_free (l_page->m_page_text); if (l_page->m_page_blocks_mask) ho_bitmap_free (l_page->m_page_blocks_mask); /* free block arrays */ if (l_page->m_blocks_text) free (l_page->m_blocks_text); if (l_page->m_blocks_lines_mask) free (l_page->m_blocks_lines_mask); /* free lines arrays */ if (l_page->n_lines) free (l_page->n_lines); if (l_page->m_lines_text) free (l_page->m_lines_text); if (l_page->m_lines_line_mask) free (l_page->m_lines_line_mask); if (l_page->m_lines_words_mask) free (l_page->m_lines_words_mask); /* free words arrays */ if (l_page->n_words) free (l_page->n_words); if (l_page->m_words_font_mask) free (l_page->m_words_font_mask); if (l_page->m_words_text) free (l_page->m_words_text); if (l_page->m_words_line_mask) free (l_page->m_words_line_mask); /* free fonts arrays */ if (l_page->n_fonts) free (l_page->n_fonts); /* free this page */ if (l_page) free (l_page); return FALSE; } int ho_layout_create_block_mask (ho_layout * l_page) { ho_objmap *o_map_blocks = NULL; int i; /* set the font dimentions info in the main text matrix */ ho_dimentions_font_width_height_nikud (l_page->m_page_text, 12, 350, 12, 350); /* set line_spacing in the main text matrix */ ho_dimentions_line_spacing (l_page->m_page_text); /* create the blocks mask */ l_page->m_page_blocks_mask = ho_segment_paragraphs (l_page->m_page_text, l_page->type); /* count blocks */ o_map_blocks = ho_objmap_new_from_bitmap (l_page->m_page_blocks_mask); /* set number of blocks */ l_page->n_blocks = ho_objmap_get_size (o_map_blocks); ho_objmap_free (o_map_blocks); /* allocate blocks arrays */ l_page->m_blocks_text = (ho_bitmap **) malloc (l_page->n_blocks * sizeof (ho_bitmap *)); if (!l_page->m_blocks_text) return TRUE; l_page->m_blocks_lines_mask = (ho_bitmap **) malloc (l_page->n_blocks * sizeof (ho_bitmap *)); if (!l_page->m_blocks_lines_mask) return TRUE; /* allocate lines arrays */ l_page->n_lines = (int *) malloc (l_page->n_blocks * sizeof (int)); if (!l_page->n_lines) return TRUE; l_page->m_lines_text = (ho_bitmap ***) malloc (l_page->n_blocks * sizeof (ho_bitmap **)); if (!l_page->m_lines_text) return TRUE; l_page->m_lines_line_mask = (ho_bitmap ***) malloc (l_page->n_blocks * sizeof (ho_bitmap **)); if (!l_page->m_lines_line_mask) return TRUE; l_page->m_lines_words_mask = (ho_bitmap ***) malloc (l_page->n_blocks * sizeof (ho_bitmap **)); if (!l_page->m_lines_words_mask) return TRUE; /* allocate words arrays */ l_page->n_words = (int **) malloc (l_page->n_blocks * sizeof (int *)); if (!l_page->n_words) return TRUE; l_page->m_words_text = (ho_bitmap ****) malloc (l_page->n_blocks * sizeof (ho_bitmap ***)); if (!l_page->m_words_text) return TRUE; l_page->m_words_line_mask = (ho_bitmap ****) malloc (l_page->n_blocks * sizeof (ho_bitmap ***)); if (!l_page->m_words_line_mask) return TRUE; l_page->m_words_font_mask = (ho_bitmap ****) malloc (l_page->n_blocks * sizeof (ho_bitmap ***)); if (!l_page->m_words_font_mask) return TRUE; /* allocate fonts arrays */ l_page->n_fonts = (int ***) malloc (l_page->n_blocks * sizeof (int **)); if (!l_page->n_fonts) return TRUE; /* link all free pointers to NULL */ for (i = 0; i < l_page->n_blocks; i++) { l_page->m_blocks_lines_mask[i] = NULL; l_page->m_blocks_text[i] = NULL; l_page->n_lines[i] = 0; l_page->m_lines_words_mask[i] = NULL; l_page->m_lines_text[i] = NULL; l_page->m_lines_line_mask[i] = NULL; l_page->n_words[i] = NULL; l_page->m_words_text[i] = NULL; l_page->m_words_line_mask[i] = NULL; l_page->m_words_font_mask[i] = NULL; l_page->n_fonts[i] = NULL; } return FALSE; } int ho_layout_create_line_mask (ho_layout * l_page, const int block_index) { ho_bitmap *m_block_text = NULL; /* ho_bitmap *m_temp = NULL; */ ho_objmap *o_map_blocks = NULL; /* int x, y, height, width; */ int i; m_block_text = ho_layout_get_block_text (l_page, block_index); /* set the font dimentions info in the main text block */ ho_dimentions_font_width_height_nikud (m_block_text, 12, 350, 12, 350); /* set line_spacing in the main text block */ ho_dimentions_line_spacing (m_block_text); /* create the lines mask */ l_page->m_blocks_lines_mask[block_index] = ho_segment_lines (m_block_text); l_page->m_blocks_text[block_index] = m_block_text; /* count lines */ o_map_blocks = ho_objmap_new_from_bitmap (l_page->m_blocks_lines_mask[block_index]); /* set number of lines */ l_page->n_lines[block_index] = ho_objmap_get_size (o_map_blocks); ho_objmap_free (o_map_blocks); /* allocate lines arrays */ l_page->m_lines_text[block_index] = (ho_bitmap **) malloc (l_page->n_lines[block_index] * sizeof (ho_bitmap *)); if (!l_page->m_lines_text[block_index]) return TRUE; l_page->m_lines_line_mask[block_index] = (ho_bitmap **) malloc (l_page->n_lines[block_index] * sizeof (ho_bitmap *)); if (!l_page->m_lines_line_mask[block_index]) return TRUE; l_page->m_lines_words_mask[block_index] = (ho_bitmap **) malloc (l_page->n_lines[block_index] * sizeof (ho_bitmap *)); if (!l_page->m_lines_words_mask[block_index]) return TRUE; /* allocate words arrays */ l_page->n_words[block_index] = (int *) malloc (l_page->n_lines[block_index] * sizeof (int)); if (!l_page->n_words[block_index]) return TRUE; l_page->m_words_text[block_index] = (ho_bitmap ***) malloc (l_page->n_lines[block_index] * sizeof (ho_bitmap **)); if (!l_page->m_words_text[block_index]) return TRUE; l_page->m_words_line_mask[block_index] = (ho_bitmap ***) malloc (l_page->n_lines[block_index] * sizeof (ho_bitmap **)); if (!l_page->m_words_line_mask[block_index]) return TRUE; l_page->m_words_font_mask[block_index] = (ho_bitmap ***) malloc (l_page->n_lines[block_index] * sizeof (ho_bitmap **)); if (!l_page->m_words_font_mask[block_index]) return TRUE; /* allocate fonts arrays */ l_page->n_fonts[block_index] = (int **) malloc (l_page->n_lines[block_index] * sizeof (int *)); if (!l_page->n_fonts) return TRUE; /* link all free pointers to NULL */ for (i = 0; i < l_page->n_lines[block_index]; i++) { l_page->m_lines_words_mask[block_index][i] = NULL; l_page->m_lines_text[block_index][i] = NULL; l_page->m_lines_line_mask[block_index][i] = NULL; l_page->n_words[block_index][i] = 0; l_page->m_words_text[block_index][i] = NULL; l_page->m_words_line_mask[block_index][i] = NULL; l_page->m_words_font_mask[block_index][i] = NULL; l_page->n_fonts[block_index][i] = NULL; } return FALSE; } int ho_layout_create_word_mask (ho_layout * l_page, const int block_index, const int line_index) { ho_objmap *o_map_blocks = NULL; ho_bitmap *m_line_text = NULL; ho_bitmap *m_line_line_mask = NULL; /* int x, y, height, width; */ int i; m_line_text = ho_layout_get_line_text (l_page, block_index, line_index); if (!m_line_text) return TRUE; ho_dimentions_font_width_height_nikud (m_line_text, 12, 350, 12, 350); l_page->m_lines_text[block_index][line_index] = m_line_text; /* create the words mask */ m_line_line_mask = ho_layout_get_line_line_mask (l_page, block_index, line_index); if (!m_line_line_mask) return TRUE; l_page->m_lines_line_mask[block_index][line_index] = m_line_line_mask; m_line_text->line_spacing = l_page->m_blocks_text[block_index]->line_spacing; ho_dimentions_font_spacing (m_line_text, m_line_line_mask); ho_dimentions_line_fill (m_line_text, m_line_line_mask); l_page->m_lines_words_mask[block_index][line_index] = ho_segment_words (m_line_text, m_line_line_mask, l_page->font_spacing_code); /* count words */ o_map_blocks = ho_objmap_new_from_bitmap (l_page-> m_lines_words_mask[block_index][line_index]); /* set number of words */ l_page->n_words[block_index][line_index] = ho_objmap_get_size (o_map_blocks); ho_objmap_free (o_map_blocks); /* allocate words arrays */ l_page->m_words_text[block_index][line_index] = (ho_bitmap **) malloc (l_page->n_words[block_index][line_index] * sizeof (ho_bitmap *)); if (!l_page->m_words_text[block_index][line_index]) return TRUE; l_page->m_words_line_mask[block_index][line_index] = (ho_bitmap **) malloc (l_page->n_words[block_index][line_index] * sizeof (ho_bitmap *)); if (!l_page->m_words_line_mask[block_index][line_index]) return TRUE; l_page->m_words_font_mask[block_index][line_index] = (ho_bitmap **) malloc (l_page->n_words[block_index][line_index] * sizeof (ho_bitmap *)); if (!l_page->m_words_font_mask[block_index][line_index]) return TRUE; /* allocate fonts arrays */ l_page->n_fonts[block_index][line_index] = (int *) malloc (l_page->n_words[block_index][line_index] * sizeof (int)); if (!l_page->n_fonts) return TRUE; /* link all free pointers to NULL */ for (i = 0; i < l_page->n_words[block_index][line_index]; i++) { l_page->m_words_text[block_index][line_index][i] = NULL; l_page->m_words_line_mask[block_index][line_index][i] = NULL; l_page->m_words_font_mask[block_index][line_index][i] = NULL; l_page->n_fonts[block_index][line_index][i] = 0; } return FALSE; } int ho_layout_create_font_mask (ho_layout * l_page, const int block_index, const int line_index, const int word_index, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway) { /* ho_objmap *o_map_blocks = NULL; */ ho_bitmap *m_word_text = NULL; ho_bitmap *m_word_line_mask = NULL; ho_bitmap *m_word_font_mask = NULL; int x; /*, y, height, width;*/ int i; m_word_text = ho_layout_get_word_text (l_page, block_index, line_index, word_index); l_page->m_words_text[block_index][line_index][word_index] = m_word_text; /* create the words mask */ m_word_line_mask = ho_layout_get_word_line_mask (l_page, block_index, line_index, word_index); l_page->m_words_line_mask[block_index][line_index][word_index] = m_word_line_mask; /* re-adjust the font width to reflect the paragraph */ /* we need this for lines with lines with small number of fonts */ /* ho_segment_fonts use this value for segmentation */ m_word_text->font_width = l_page->m_blocks_text[block_index]->font_width; m_word_font_mask = ho_segment_fonts (m_word_text, m_word_line_mask, slicing_threshold, slicing_width, line_leeway); l_page->m_words_font_mask[block_index][line_index][word_index] = m_word_font_mask; /* count fonts */ i = 0; x = 0; while (x < m_word_font_mask->width) { /* get start&end of font */ for (; x < m_word_font_mask->width && ho_bitmap_get (m_word_font_mask, x, 2); x++) ; i++; for (; x < m_word_font_mask->width && !ho_bitmap_get (m_word_font_mask, x, 2); x++) ; } /* set number of fonts */ l_page->n_fonts[block_index][line_index][word_index] = i; /* update total number of fonts */ /* FIXME: this only works if create is used only once */ l_page->number_of_fonts += i; return FALSE; } ho_bitmap * ho_layout_get_block_text (const ho_layout * l_page, int block_index) { ho_bitmap *m_block_text = NULL; ho_bitmap *m_temp = NULL; ho_objmap *o_map_blocks = NULL; int x, y, height, width; /* get paragraph objmap */ o_map_blocks = ho_objmap_new_from_bitmap (l_page->m_page_blocks_mask); /* sort paragraph by reading order */ ho_objmap_sort_by_reading_index (o_map_blocks, l_page->type, l_page->dir); x = ho_objmap_get_object (o_map_blocks, block_index).x; y = ho_objmap_get_object (o_map_blocks, block_index).y; width = ho_objmap_get_object (o_map_blocks, block_index).width; height = ho_objmap_get_object (o_map_blocks, block_index).height; /* get sum leeway */ x -= l_page->m_page_text->font_width; y -= l_page->m_page_text->font_height; width += 2 * l_page->m_page_text->font_width; height += 2 * l_page->m_page_text->font_height; /* sanity check */ if (x < 0) x = 0; if (x + width > l_page->m_page_text->width) width = l_page->m_page_text->width - x; if (y < 0) y = 0; if (y + height > l_page->m_page_text->height) height = l_page->m_page_text->height - y; if (l_page->type) { m_block_text = ho_bitmap_clone_window (l_page->m_page_text, x, y, width, height); } else { m_temp = ho_objmap_to_bitmap_by_index (o_map_blocks, block_index); ho_bitmap_and (m_temp, l_page->m_page_text); m_block_text = ho_bitmap_clone_window (m_temp, x, y, width, height); ho_bitmap_free (m_temp); } ho_objmap_free (o_map_blocks); return m_block_text; } ho_bitmap * ho_layout_get_line_text (const ho_layout * l_page, int block_index, int line_index) { ho_bitmap *m_line_text = NULL; ho_bitmap *m_temp = NULL; ho_bitmap *m_temp2 = NULL; ho_objmap *o_map_lines = NULL; int x, y, height, width; double vertical_leeway = 0.8; /* get paragraph objmap */ o_map_lines = ho_objmap_new_from_bitmap (l_page->m_blocks_lines_mask[block_index]); /* sort lines by reading order */ ho_objmap_sort_by_reading_index (o_map_lines, 1, l_page->dir); x = ho_objmap_get_object (o_map_lines, line_index).x; y = ho_objmap_get_object (o_map_lines, line_index).y; width = ho_objmap_get_object (o_map_lines, line_index).width; height = ho_objmap_get_object (o_map_lines, line_index).height; /* get sum leeway */ x -= l_page->m_blocks_text[block_index]->font_width; y -= (int)(vertical_leeway * (double)height); width += 2 * l_page->m_blocks_text[block_index]->font_width; height = height + 2 * (int)(vertical_leeway * (double)height); /* sanity check */ if (x < 0) x = 0; if (y < 0) y = 0; if (x + width > l_page->m_blocks_text[block_index]->width) width = l_page->m_blocks_text[block_index]->width - x; if (y < 0) y = 0; if (y + height > l_page->m_blocks_text[block_index]->height) height = l_page->m_blocks_text[block_index]->height - y; m_temp = ho_objmap_to_bitmap_by_index (o_map_lines, line_index); m_temp2 = ho_bitmap_set_height (m_temp, 4 * l_page->m_blocks_text[block_index]-> font_height / 3, 2 * l_page->m_blocks_text[block_index]-> font_height / 3, 2 * l_page->m_blocks_text[block_index]->font_height / 3); ho_bitmap_free (m_temp); ho_objmap_free (o_map_lines); ho_bitmap_and (m_temp2, l_page->m_blocks_text[block_index]); m_line_text = ho_bitmap_clone_window (m_temp2, x, y, width, height); ho_bitmap_free (m_temp2); return m_line_text; } ho_bitmap * ho_layout_get_line_line_mask (const ho_layout * l_page, int block_index, int line_index) { ho_bitmap *m_line_mask = NULL; ho_bitmap *m_temp = NULL; ho_objmap *o_map_lines = NULL; int x, y, height, width; double vertical_leeway = 0.8; /* get paragraph objmap */ o_map_lines = ho_objmap_new_from_bitmap (l_page->m_blocks_lines_mask[block_index]); /* sort lines by reading order */ ho_objmap_sort_by_reading_index (o_map_lines, 1, l_page->dir); x = ho_objmap_get_object (o_map_lines, line_index).x; y = ho_objmap_get_object (o_map_lines, line_index).y; width = ho_objmap_get_object (o_map_lines, line_index).width; height = ho_objmap_get_object (o_map_lines, line_index).height; /* get sum leeway */ x -= l_page->m_blocks_text[block_index]->font_width; y -= (int)(vertical_leeway * (double)height); width += 2 * l_page->m_blocks_text[block_index]->font_width; height += 2 * (int)(vertical_leeway * (double)height); /* sanity check */ if (x < 0) x = 0; if (y < 0) y = 0; if (x + width > l_page->m_blocks_text[block_index]->width) width = l_page->m_blocks_text[block_index]->width - x; if (y + height > l_page->m_blocks_text[block_index]->height) height = l_page->m_blocks_text[block_index]->height - y; m_temp = ho_objmap_to_bitmap_by_index (o_map_lines, line_index); ho_objmap_free (o_map_lines); m_line_mask = ho_bitmap_clone_window (m_temp, x, y, width, height); ho_bitmap_free (m_temp); return m_line_mask; } ho_bitmap * ho_layout_get_word_text (const ho_layout * l_page, int block_index, int line_index, int word_index) { ho_bitmap *m_word_text = NULL; ho_bitmap *m_line_text = NULL; ho_objmap *o_map_words = NULL; int x, y, width, height; int x_start, y_start; /* get paragraph objmap */ o_map_words = ho_objmap_new_from_bitmap (l_page-> m_lines_words_mask[block_index][line_index]); x_start = l_page->m_lines_words_mask[block_index][line_index]->x; y_start = l_page->m_lines_words_mask[block_index][line_index]->y; /* sort lines by reading order */ ho_objmap_sort_by_reading_index (o_map_words, 253, l_page->dir); x = ho_objmap_get_object (o_map_words, word_index).x + x_start; y = ho_objmap_get_object (o_map_words, word_index).y + y_start; width = ho_objmap_get_object (o_map_words, word_index).width; height = ho_objmap_get_object (o_map_words, word_index).height; ho_objmap_free (o_map_words); m_line_text = l_page->m_lines_text[block_index][line_index]; m_word_text = ho_bitmap_clone_window (l_page->m_page_text, x, y, width, height); /* get the right fill args from line and not from page */ m_word_text->avg_line_fill = m_line_text->avg_line_fill; m_word_text->com_line_fill = m_line_text->com_line_fill; m_word_text->font_height = m_line_text->font_height; m_word_text->font_width = m_line_text->font_width; m_word_text->font_spacing = m_line_text->font_spacing; m_word_text->line_spacing = m_line_text->line_spacing; return m_word_text; } ho_bitmap * ho_layout_get_word_line_mask (const ho_layout * l_page, int block_index, int line_index, int word_index) { ho_bitmap *m_word_line_mask = NULL; ho_bitmap *m_line_mask = NULL; ho_objmap *o_map_words = NULL; int x, y, width, height; int x_start, y_start; /* get paragraph objmap */ o_map_words = ho_objmap_new_from_bitmap (l_page-> m_lines_words_mask[block_index][line_index]); x_start = l_page->m_lines_words_mask[block_index][line_index]->x; y_start = l_page->m_lines_words_mask[block_index][line_index]->y; /* sort lines by reading order */ ho_objmap_sort_by_reading_index (o_map_words, 253, l_page->dir); x = ho_objmap_get_object (o_map_words, word_index).x; y = ho_objmap_get_object (o_map_words, word_index).y; width = ho_objmap_get_object (o_map_words, word_index).width; height = ho_objmap_get_object (o_map_words, word_index).height; ho_objmap_free (o_map_words); m_line_mask = l_page->m_lines_line_mask[block_index][line_index]; m_word_line_mask = ho_bitmap_clone_window (m_line_mask, x, y, width, height); return m_word_line_mask; } ho_bitmap * ho_layout_get_font_text (const ho_layout * l_page, int block_index, int line_index, int word_index, int font_index) { ho_bitmap *m_font_text = NULL; ho_bitmap *m_word_text = NULL; ho_bitmap *m_word_font_mask = NULL; int x, y, width, height; int x_start, x_end; int i; int index; /* if left to right font order is reversed */ if (l_page->dir) { index = l_page->n_fonts[block_index][line_index][word_index] - font_index - 1; } else index = font_index; m_word_text = l_page->m_words_text[block_index][line_index][word_index]; m_word_font_mask = l_page->m_words_font_mask[block_index][line_index][word_index]; /* get font start and end points */ /* count fonts */ i = -1; x = m_word_font_mask->width - 1; while (x >= 0 && i < index) { /* get start&end of font */ for (; x >= 0 && ho_bitmap_get (m_word_font_mask, x, 2); x--) ; x_end = x + 1; i++; for (; x >= 0 && !ho_bitmap_get (m_word_font_mask, x, 2); x--) ; x_start = x; } /* get font place on m_text */ y = m_word_text->y; x = m_word_text->x + x_start; height = m_word_text->height; width = x_end - x_start + 1; m_font_text = ho_bitmap_clone_window (l_page->m_page_text, x, y, width, height); /* get the right fill args from line and not from page */ m_font_text->avg_line_fill = m_word_text->avg_line_fill; m_font_text->com_line_fill = m_word_text->com_line_fill; m_font_text->font_height = m_word_text->font_height; m_font_text->font_width = m_word_text->font_width; m_font_text->font_spacing = m_word_text->font_spacing; m_font_text->line_spacing = m_word_text->line_spacing; return m_font_text; } ho_bitmap * ho_layout_get_font_line_mask (const ho_layout * l_page, int block_index, int line_index, int word_index, int font_index) { ho_bitmap *m_font_line_mask = NULL; ho_bitmap *m_word_line_mask = NULL; ho_bitmap *m_word_font_mask = NULL; int x, width, height; int x_start, x_end; int i; int index; /* if left to right font order is reversed */ if (l_page->dir) { index = l_page->n_fonts[block_index][line_index][word_index] - font_index - 1; } else index = font_index; m_word_line_mask = l_page->m_words_line_mask[block_index][line_index][word_index]; m_word_font_mask = l_page->m_words_font_mask[block_index][line_index][word_index]; /* get font start and end points */ /* count fonts */ i = -1; x = m_word_font_mask->width - 1; while (x >= 0 && i < index) { /* get start&end of font */ for (; x >= 0 && ho_bitmap_get (m_word_font_mask, x, 2); x--) ; x_end = x + 1; i++; for (; x >= 0 && !ho_bitmap_get (m_word_font_mask, x, 2); x--) ; x_start = x; } /* get font place on m_text */ height = m_word_line_mask->height; width = x_end - x_start + 1; m_font_line_mask = ho_bitmap_clone_window (m_word_line_mask, x_start, 0, width, height); return m_font_line_mask; } libhocr-0.10.17/src/ho_bitmap.c0000644000175000017500000010401611051625735013127 00000000000000 /*************************************************************************** * ho_bitmap.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #ifdef USE_TIFF #include #endif #ifndef TRUE #define TRUE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL ((void*)0) #endif #include "ho_bitmap.h" #include "ho_objmap.h" ho_bitmap * ho_bitmap_new (const int width, const int height) { ho_bitmap *m_new = NULL; /* * allocate memory for pixbuf */ m_new = (ho_bitmap *) malloc (sizeof (ho_bitmap)); if (!m_new) { return NULL; } /* * read header */ m_new->x = 0; m_new->y = 0; m_new->width = width; m_new->height = height; m_new->rowstride = (width - 1) / 8 + 1; m_new->type = 0; m_new->font_height = 0; m_new->font_width = 0; m_new->line_spacing = 0; m_new->font_spacing = 0; m_new->avg_line_fill = 0; m_new->com_line_fill = 0; m_new->nikud = FALSE; /* * allocate memory for data (and set to zero) */ m_new->data = calloc (m_new->height * m_new->rowstride, sizeof (unsigned char)); if (!(m_new->data)) { free (m_new); return NULL; } return m_new; } int ho_bitmap_free (ho_bitmap * m) { if (!m) return TRUE; if (m->data) free (m->data); free (m); return FALSE; } ho_bitmap * ho_bitmap_clone (const ho_bitmap * m) { ho_bitmap *m_out; /* * allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* * copy data */ memcpy (m_out->data, m->data, m_out->height * m_out->rowstride); return m_out; } ho_bitmap * ho_bitmap_clone_window (const ho_bitmap * m, const int x, const int y, const int width, const int height) { ho_bitmap *m_out; int x1, y1; /* * allocate memory */ m_out = ho_bitmap_new (width, height); if (!m_out) return NULL; /* * set origin of sub window */ m_out->x = m->x + x; m_out->y = m->y + y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* * copy data */ for (x1 = 0; x1 < width && x1 < m->width; x1++) for (y1 = 0; y1 < height && y1 < m->height; y1++) { if ((x + x1) > 0 && (y + y1) > 0 && ho_bitmap_get (m, x + x1, y + y1)) ho_bitmap_set (m_out, x1, y1); } return m_out; } int ho_bitmap_binop_window (ho_bitmap * m_left, const ho_bitmap * m_right, unsigned char op) { ho_bitmap *m_temp = NULL; int i; m_temp = ho_bitmap_clone_window (m_right, m_right->x, m_right->y, m_right->width, m_right->height); if (!m_temp) return TRUE; switch (op) { case 0: /* and */ for (i = 0; i < m_right->height * m_right->rowstride; i++) m_left->data[i] &= m_temp->data[i]; break; case 1: /* or */ for (i = 0; i < m_right->height * m_right->rowstride; i++) m_left->data[i] |= m_temp->data[i]; break; case 2: /* xor */ for (i = 0; i < m_right->height * m_right->rowstride; i++) m_left->data[i] ^= m_temp->data[i]; break; case 3: /* andnot */ for (i = 0; i < m_right->height * m_right->rowstride; i++) m_left->data[i] &= ~m_temp->data[i]; break; } ho_bitmap_free (m_temp); return FALSE; } int ho_bitmap_and (ho_bitmap * m_left, const ho_bitmap * m_right) { int i; /* * check sizes */ if (m_left->width != m_right->width || m_left->height != m_right->height) return TRUE; /* * copy data */ for (i = 0; i < m_right->height * m_right->rowstride; i++) m_left->data[i] &= m_right->data[i]; return FALSE; } int ho_bitmap_or (ho_bitmap * m_left, const ho_bitmap * m_right) { int i; /* * check sizes */ if (m_left->width != m_right->width || m_left->height != m_right->height) return TRUE; /* * copy data */ for (i = 0; i < m_right->height * m_right->rowstride; i++) m_left->data[i] |= m_right->data[i]; return FALSE; } int ho_bitmap_xor (ho_bitmap * m_left, const ho_bitmap * m_right) { int i; /* * check sizes */ if (m_left->width != m_right->width || m_left->height != m_right->height) return TRUE; /* * copy data */ for (i = 0; i < m_right->height * m_right->rowstride; i++) m_left->data[i] ^= m_right->data[i]; return FALSE; } int ho_bitmap_andnot (ho_bitmap * m_left, const ho_bitmap * m_right) { int i; /* * check sizes */ if (m_left->width != m_right->width || m_left->height != m_right->height) return TRUE; /* * copy data */ for (i = 0; i < m_right->height * m_right->rowstride; i++) m_left->data[i] &= ~m_right->data[i]; return FALSE; } int ho_bitmap_copy (ho_bitmap * m_left, const ho_bitmap * m_right) { int i; /* * check sizes */ if (m_left->width != m_right->width || m_left->height != m_right->height) return TRUE; /* * copy data */ for (i = 0; i < m_right->height * m_right->rowstride; i++) m_left->data[i] = m_right->data[i]; return FALSE; } ho_bitmap * ho_bitmap_not (const ho_bitmap * m) { int i; ho_bitmap *m_out; /* * allocate m_out */ m_out = ho_bitmap_new (m->width, m->height); /* * copy header data */ m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* * check valid memory */ if (!m_out) return NULL; /* * copy data */ for (i = 0; i < m->height * m->rowstride; i++) m_out->data[i] = ~m->data[i]; return m_out; } ho_bitmap * ho_bitmap_dilation_n (const ho_bitmap * m, const unsigned char n) { ho_bitmap *m_out; int x, y; unsigned char sum; if (!m) return NULL; /* * allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* * do dilation */ for (x = 1; x < m->width - 1; x++) for (y = 1; y < m->height - 1; y++) { /* * if white pixel */ if (!ho_bitmap_get (m, x, y)) { sum = ho_bitmap_get (m, x - 1, y - 1) + ho_bitmap_get (m, x - 1, y) + ho_bitmap_get (m, x - 1, y + 1) + ho_bitmap_get (m, x, y - 1) + ho_bitmap_get (m, x, y + 1) + ho_bitmap_get (m, x + 1, y - 1) + ho_bitmap_get (m, x + 1, y) + ho_bitmap_get (m, x + 1, y + 1); if (sum >= n) ho_bitmap_set (m_out, x, y); } else ho_bitmap_set (m_out, x, y); } return m_out; } ho_bitmap * ho_bitmap_erosion_n (const ho_bitmap * m, const unsigned char n) { ho_bitmap *m_out; int x, y; unsigned char sum; if (!m) return NULL; /* * allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* * do erosion */ for (x = 1; x < m->width - 1; x++) for (y = 1; y < m->height - 1; y++) { /* * if black pixel */ if (ho_bitmap_get (m, x, y)) { sum = ho_bitmap_get (m, x - 1, y - 1) + ho_bitmap_get (m, x - 1, y) + ho_bitmap_get (m, x - 1, y + 1) + ho_bitmap_get (m, x, y - 1) + ho_bitmap_get (m, x, y + 1) + ho_bitmap_get (m, x + 1, y - 1) + ho_bitmap_get (m, x + 1, y) + ho_bitmap_get (m, x + 1, y + 1); if ((8 - sum) < n) ho_bitmap_set (m_out, x, y); } } return m_out; } ho_bitmap * ho_bitmap_set_height (const ho_bitmap * m, const int height, const int top, const int bottom) { ho_bitmap *m_out; int x, y, locale_top, locale_bottom, locale_height; /* * allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* * do max_height */ for (x = 0; x < m->width; x++) for (y = 0; y < m->height; y++) { /* * if black pixel */ if (ho_bitmap_get (m, x, y)) { locale_height = height; locale_top = top; locale_bottom = bottom; if (y - top < 0) locale_top = y; if (y + height + bottom > m->height) { locale_bottom = 0; locale_height = m->height - y - 1; } ho_bitmap_draw_vline (m_out, x, y - locale_top, locale_height + locale_bottom); y = m->height; } } return m_out; } ho_bitmap * ho_bitmap_set_height_from_bottom (const ho_bitmap * m, const int height, const int top, const int bottom) { ho_bitmap *m_out; int x, y, locale_top, locale_bottom, locale_height; /* * allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* * do max_height */ for (x = 0; x < m->width; x++) for (y = m->height - 1; y >= 0; y--) { /* * if black pixel */ if (ho_bitmap_get (m, x, y)) { y -= height; locale_height = height; locale_top = top; locale_bottom = bottom; if (y - top < 0) locale_top = y; if (y + height + bottom > m->height) { locale_bottom = 0; locale_height = m->height - y - 1; } ho_bitmap_draw_vline (m_out, x, y - locale_top, locale_height + locale_bottom); y = -1; } } return m_out; } ho_bitmap * ho_bitmap_dilation (const ho_bitmap * m) { if (!m) return NULL; return ho_bitmap_dilation_n (m, 1); } ho_bitmap * ho_bitmap_erosion (const ho_bitmap * m) { if (!m) return NULL; return ho_bitmap_erosion_n (m, 1); } ho_bitmap * ho_bitmap_opening (const ho_bitmap * m) { ho_bitmap *m_temp; ho_bitmap *m_out; if (!m) return NULL; m_temp = ho_bitmap_erosion (m); m_out = ho_bitmap_dilation (m_temp); ho_bitmap_free (m_temp); return m_out; } ho_bitmap * ho_bitmap_closing (const ho_bitmap * m) { ho_bitmap *m_temp; ho_bitmap *m_out; if (!m) return NULL; m_temp = ho_bitmap_dilation (m); m_out = ho_bitmap_erosion (m_temp); ho_bitmap_free (m_temp); return m_out; } ho_bitmap * ho_bitmap_hlink (const ho_bitmap * m, const int size) { ho_bitmap *m_out; int x, y; int k; int l, last; /* * allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; for (y = 0; y < m->height; y++) { last = -size; for (x = 0; x < m->width; x++) { if (ho_bitmap_get (m, x, y)) /* black pixel */ { ho_bitmap_set (m_out, x, y); l = (int) x - last; if ((l > 1) && (l < size)) { if (last < 0) last = 0; for (k = last; k < x; k++) ho_bitmap_set (m_out, k, y); } last = x; } } } return m_out; } ho_bitmap * ho_bitmap_herode (const ho_bitmap * m, const int size) { ho_bitmap *m_out; int x, y; int k; int l, last; /* * allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* * set all bitmap black */ memset ((void *) (m_out->data), 0xff, m_out->height * m_out->rowstride); for (y = 0; y < m->height; y++) { last = -size; for (x = 0; x < m->width; x++) { if (!ho_bitmap_get (m, x, y)) /* white pixel */ { ho_bitmap_unset (m_out, x, y); l = (int) x - last; if ((l > 1) && (l < size)) { if (last < 0) last = 0; for (k = last; k < x; k++) ho_bitmap_unset (m_out, k, y); } last = x; } } } return m_out; } ho_bitmap * ho_bitmap_vlink (const ho_bitmap * m, const int size) { ho_bitmap *m_out; int x, y; int k; int l, last; /* * allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; for (x = 0; x < m->width; x++) { last = -size; for (y = 0; y < m->height; y++) { if (ho_bitmap_get (m, x, y)) /* black pixel */ { ho_bitmap_set (m_out, x, y); l = (int) y - last; if ((l > 1) && (l < size)) { for (k = last; k < y; k++) ho_bitmap_set (m_out, x, k); } last = y; } } } return m_out; } ho_bitmap * ho_bitmap_edge (const ho_bitmap * m, const int n) { ho_bitmap *m_out; ho_bitmap *m_temp1; ho_bitmap *m_temp2; int i; m_temp1 = ho_bitmap_clone (m); if (!m_temp1) return NULL; for (i = 0; i < n; i++) { m_temp2 = ho_bitmap_erosion (m_temp1); ho_bitmap_free (m_temp1); if (!m_temp2) return NULL; m_temp1 = m_temp2; } m_out = ho_bitmap_clone (m); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; ho_bitmap_andnot (m_out, m_temp1); ho_bitmap_free (m_temp1); return m_out; } double ho_bitmap_get_fill (const ho_bitmap * m, const int x, const int y, const int width, const int height) { int current_x, current_y; int fill; if (!width || !height || x < 0 || y < 0 || (x + width) > m->width || (y + height) > m->height) return -1.0; fill = 0; for (current_y = y; current_y < y + height; current_y++) for (current_x = x; current_x < x + width; current_x++) fill += ho_bitmap_get (m, current_x, current_y); return (double) fill / (double) (width * height); } int ho_bitmap_draw_box (ho_bitmap * m, const int x, const int y, const int width, const int height) { int x1, y1; /* draw */ for (x1 = x; x1 < (x + width) && x1 < m->width; x1++) for (y1 = y; y1 < (y + height) && y1 < m->height; y1++) ho_bitmap_set (m, x1, y1); return FALSE; } int ho_bitmap_draw_vline (ho_bitmap * m, const int x, const int y, const int height) { int ix = x, iy = y; int y1; /* sanity check */ if (ix > m->width) ix = m->width - 1; if (iy > m->height) iy = m->height - 1; /* draw */ for (y1 = iy; y1 < (iy + height) && y1 < m->height; y1++) { ho_bitmap_set (m, ix, y1); } return FALSE; } int ho_bitmap_delete_vline (ho_bitmap * m, const int x, const int y, const int height) { int ix = x, iy = y; int y1; /* sanity check */ if (ix > m->width) ix = m->width - 1; if (iy > m->height) iy = m->height - 1; /* draw */ for (y1 = iy; y1 < (iy + height) && y1 < m->height - 1; y1++) ho_bitmap_unset (m, ix, y1); return FALSE; } int ho_bitmap_draw_hline (ho_bitmap * m, const int x, const int y, const int width) { int ix = x, iy = y; int x1; /* sanity check */ if (ix > m->width) ix = m->width - 1; if (iy > m->height) iy = m->height - 1; /* draw */ for (x1 = x; x1 < (x + width) && x1 < m->width; x1++) ho_bitmap_set (m, x1, y); return FALSE; } int ho_bitmap_delete_hline (ho_bitmap * m, const int x, const int y, const int width) { int ix = x, iy = y; int x1; /* sanity check */ if (ix > m->width) ix = m->width - 1; if (iy > m->height) iy = m->height - 1; /* draw */ for (x1 = x; x1 < (x + width) && x1 < m->width; x1++) ho_bitmap_unset (m, x1, y); return FALSE; } int ho_bitmap_draw_box_empty (ho_bitmap * m, const int x, const int y, const int width, const int height) { ho_bitmap_draw_hline (m, x, y, width); ho_bitmap_draw_hline (m, x, y + m->height - 1, width); ho_bitmap_draw_vline (m, x, y, height); ho_bitmap_draw_vline (m, x + m->width - 1, y, height); return FALSE; } ho_bitmap * ho_bitmap_filter_by_size (const ho_bitmap * m, int min_height, int max_height, int min_width, int max_width) { ho_objmap *m_obj; ho_bitmap *m_out; /* create a new objmap */ m_obj = ho_objmap_new_from_bitmap (m); if (!m_obj) return NULL; m_out = ho_objmap_to_bitmap_by_size (m_obj, min_height, max_height, min_width, max_width); /* free objmap */ ho_objmap_free (m_obj); return m_out; } ho_bitmap * ho_bitmap_filter_boxes (const ho_bitmap * m, const int leeway_down, const int leeway_up) { ho_objmap *m_obj; ho_bitmap *m_out; int index; int x, y, width, height; /* allocate memory */ m_obj = ho_objmap_new_from_bitmap (m); if (!m_obj) return NULL; m_out = ho_bitmap_new (m->width, m->height); m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; if (!m_out) { ho_objmap_free (m_obj); return NULL; } /* loop over all the objects and box them */ for (index = 0; index < m_obj->obj_list->size; index++) { x = (((m_obj->obj_list)->objects)[index]).x; y = (((m_obj->obj_list)->objects)[index]).y; width = (((m_obj->obj_list)->objects)[index]).width; height = (((m_obj->obj_list)->objects)[index]).height; y -= leeway_up; height += leeway_up + leeway_down; if (y < 0) y = 0; if (y + height >= m->height) height = m->height - y - 1; ho_bitmap_draw_box (m_out, x, y, width, height); } return m_out; } ho_bitmap * ho_bitmap_filter_fill (const ho_bitmap * m) { ho_objmap *m_obj; ho_bitmap *m_out; ho_bitmap *m_temp1; ho_bitmap *m_temp2; int index; int width, height; /* allocate memory */ m_obj = ho_objmap_new_from_bitmap (m); if (!m_obj) return NULL; m_out = ho_bitmap_new (m->width, m->height); if (!m_out) { ho_objmap_free (m_obj); return NULL; } m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* loop over all the objects and box them */ for (index = 0; index < m_obj->obj_list->size; index++) { /* get a dimention factor */ width = (((m_obj->obj_list)->objects)[index]).width; height = (((m_obj->obj_list)->objects)[index]).height; /* copy only the current object to a new bitmap */ m_temp1 = ho_objmap_to_bitmap_by_index (m_obj, index); /* fill the current object */ m_temp2 = ho_bitmap_hlink (m_temp1, width / 4); ho_bitmap_free (m_temp1); m_temp1 = ho_bitmap_vlink (m_temp2, height / 4); ho_bitmap_free (m_temp2); /* add to matrix out */ ho_bitmap_or (m_out, m_temp1); ho_bitmap_free (m_temp1); } return m_out; } ho_bitmap * ho_bitmap_filter_set_height (const ho_bitmap * m, const int height, const int top, const int bottom) { ho_objmap *m_obj; ho_bitmap *m_out; ho_bitmap *m_temp1; ho_bitmap *m_temp2; int index; /* allocate memory */ m_obj = ho_objmap_new_from_bitmap (m); if (!m_obj) return NULL; m_out = ho_bitmap_new (m->width, m->height); if (!m_out) { ho_objmap_free (m_obj); return NULL; } m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* loop over all the objects and box them */ for (index = 0; index < m_obj->obj_list->size; index++) { /* copy only the current object to a new bitmap */ m_temp1 = ho_objmap_to_bitmap_by_index (m_obj, index); if (!m_temp1) continue; /* take height pixels from this object */ m_temp2 = ho_bitmap_set_height (m_temp1, height, top, bottom); ho_bitmap_free (m_temp1); if (!m_temp2) continue; /* add to matrix out */ ho_bitmap_or (m_out, m_temp2); ho_bitmap_free (m_temp2); } return m_out; } ho_bitmap * ho_bitmap_filter_set_height_from_bottom (const ho_bitmap * m, const int height, const int top, const int bottom) { ho_objmap *m_obj; ho_bitmap *m_out; ho_bitmap *m_temp1; ho_bitmap *m_temp2; int index; /* allocate memory */ m_obj = ho_objmap_new_from_bitmap (m); if (!m_obj) return NULL; m_out = ho_bitmap_new (m->width, m->height); if (!m_out) { ho_objmap_free (m_obj); return NULL; } m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* loop over all the objects and box them */ for (index = 0; index < m_obj->obj_list->size; index++) { /* copy only the current object to a new bitmap */ m_temp1 = ho_objmap_to_bitmap_by_index (m_obj, index); if (!m_temp1) continue; /* take height pixels from this object */ m_temp2 = ho_bitmap_set_height_from_bottom (m_temp1, height, top, bottom); ho_bitmap_free (m_temp1); if (!m_temp2) continue; /* add to matrix out */ ho_bitmap_or (m_out, m_temp2); ho_bitmap_free (m_temp2); } return m_out; } ho_bitmap * ho_bitmap_filter_hlink (ho_bitmap * m, int size, int max_height) { ho_bitmap *m_out; ho_bitmap *m_temp; /* this function use objects by the "_by_size" function this is why it is a * filter and not regular bitmap function */ /* get only the thin objects */ m_temp = ho_bitmap_filter_by_size (m, 5, max_height, 5, m->width / 2); /* hlink the thin objects */ m_out = ho_bitmap_hlink (m_temp, size); /* add the rest of the large objects */ ho_bitmap_or (m_out, m); ho_bitmap_free (m_temp); return m_out; } ho_bitmap * ho_bitmap_filter_remove_dots (const ho_bitmap * m, const unsigned char erosion_n, const unsigned char dilation_n) { int x, y; unsigned char sum; ho_bitmap *m_temp; ho_bitmap *m_out; ho_objmap *m_obj; int index; int width, height; /* allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* connect all the small dots */ m_temp = ho_bitmap_dilation (m); /* check the size of objects */ m_obj = ho_objmap_new_from_bitmap (m_temp); ho_bitmap_free (m_temp); for (x = 1; x < (m->width - 1); x++) for (y = 1; y < (m->height - 1); y++) { /* check the size of this pixel's object */ index = ho_objmap_get (m_obj, x, y); if (index) { width = (((m_obj->obj_list)->objects)[index - 1]).width; height = (((m_obj->obj_list)->objects)[index - 1]).height; } else { width = 0; height = 0; } /* in a big object do erosion */ if (width > m->width / 4 || height > m->height / 4) { if (ho_bitmap_get (m, x, y)) /* black pixel */ { sum = ho_bitmap_get (m, x - 1, y - 1) + ho_bitmap_get (m, x - 1, y) + ho_bitmap_get (m, x - 1, y + 1) + ho_bitmap_get (m, x, y - 1) + ho_bitmap_get (m, x, y + 1) + ho_bitmap_get (m, x + 1, y - 1) + ho_bitmap_get (m, x + 1, y) + ho_bitmap_get (m, x + 1, y + 1); /* n number of white pixels or more */ if ((8 - sum) < erosion_n) ho_bitmap_set (m_out, x, y); } } else /* if in a small object do dilation */ { if (!ho_bitmap_get (m, x, y)) /* white pixel */ { sum = ho_bitmap_get (m, x - 1, y - 1) + ho_bitmap_get (m, x - 1, y) + ho_bitmap_get (m, x - 1, y + 1) + ho_bitmap_get (m, x, y - 1) + ho_bitmap_get (m, x, y + 1) + ho_bitmap_get (m, x + 1, y - 1) + ho_bitmap_get (m, x + 1, y) + ho_bitmap_get (m, x + 1, y + 1); /* n number of black neighbors or more */ if (sum >= dilation_n) ho_bitmap_set (m_out, x, y); } else ho_bitmap_set (m_out, x, y); } } ho_objmap_free (m_obj); return m_out; } ho_bitmap * ho_bitmap_filter_obj_extend_lateraly (const ho_bitmap * m, const int ext_width) { ho_objmap *m_obj; ho_bitmap *m_temp; ho_bitmap *m_out; int x, y; int index; int width, height; m_temp = ho_bitmap_clone (m); if (!m_temp) return NULL; /* loop over all objects and extend them lateraly */ /* allocate memory */ m_obj = ho_objmap_new_from_bitmap (m_temp); if (!m_obj) { ho_bitmap_free (m_temp); return NULL; } /* draw stopers */ for (index = 0; index < m_obj->obj_list->size; index++) { x = (((m_obj->obj_list)->objects)[index]).x; y = (((m_obj->obj_list)->objects)[index]).y; width = (((m_obj->obj_list)->objects)[index]).width; height = (((m_obj->obj_list)->objects)[index]).height; if (x - ext_width < 0) x = ext_width; if (x + width + ext_width >= m->width) width = m->width - x - ext_width - 1; ho_bitmap_draw_vline (m_temp, x - ext_width, y, height); ho_bitmap_draw_vline (m_temp, x + width + ext_width, y, height); } /* extend */ m_out = ho_bitmap_hlink (m_temp, 7 * ext_width / 4); ho_bitmap_free (m_temp); if (!m_out) return NULL; /* delete stopers */ for (index = 0; index < m_obj->obj_list->size; index++) { x = (((m_obj->obj_list)->objects)[index]).x; y = (((m_obj->obj_list)->objects)[index]).y; width = (((m_obj->obj_list)->objects)[index]).width; height = (((m_obj->obj_list)->objects)[index]).height; if (x - ext_width < 0) x = ext_width; if (x + width + ext_width >= m->width) width = m->width - x - ext_width - 1; ho_bitmap_delete_vline (m_out, x - ext_width, y, height); ho_bitmap_delete_vline (m_out, x + width + ext_width, y, height); } /* set origin */ m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; ho_objmap_free (m_obj); return m_out; } int ho_bitmap_filter_count_objects (const ho_bitmap * m) { ho_objmap *o_obj; int count; o_obj = ho_objmap_new_from_bitmap (m); if (!o_obj) return -1; count = ho_objmap_get_size (o_obj); ho_objmap_free (o_obj); return count; } ho_bitmap * ho_bitmap_rotate (const ho_bitmap * m, const double angle) { ho_bitmap *m_out; int x, y; int xtag, ytag; double xtag_part, ytag_part; double angle_rads; double new_point; unsigned char neighbors[2][2]; double affine_matrix[2][2]; /* * allocate memory */ m_out = ho_bitmap_new (m->width, m->height); if (!m_out) return NULL; m_out->x = m->x; m_out->y = m->y; m_out->type = m->type; m_out->font_height = m->font_height; m_out->font_width = m->font_width; m_out->font_spacing = m->font_spacing; m_out->line_spacing = m->line_spacing; m_out->avg_line_fill = m->avg_line_fill; m_out->com_line_fill = m->com_line_fill; m_out->nikud = m->nikud; /* get angle in radians */ angle_rads = angle *(2.0 * M_PI / 360); /* fill rotation matrix */ affine_matrix[0][0] = cos (angle_rads); affine_matrix[0][1] = sin (angle_rads); affine_matrix[1][0] = -affine_matrix[0][1]; affine_matrix[1][1] = affine_matrix[0][0]; /* * copy data */ for (x = 0; x < m->width; x++) for (y = 0; y < m->height; y++) { xtag_part = x * affine_matrix[0][0] + y * affine_matrix[0][1]; ytag_part = x * affine_matrix[1][0] + y * affine_matrix[1][1]; xtag = (int) xtag_part; ytag = (int) ytag_part; xtag_part = xtag_part - (double) xtag; ytag_part = ytag_part - (double) ytag; /* get neighbors */ if (xtag < 1 || ytag < 1 || xtag >= m->width || ytag >= m->height) { new_point = 0; } else { neighbors[0][0] = ho_bitmap_get (m, xtag - 1, ytag - 1); neighbors[0][1] = ho_bitmap_get (m, xtag - 1, ytag - 0); neighbors[1][0] = ho_bitmap_get (m, xtag - 0, ytag - 1); neighbors[1][1] = ho_bitmap_get (m, xtag - 0, ytag - 0); new_point = (double) neighbors[0][0] * (1.0 - xtag_part) * (1.0 - ytag_part) + (double) neighbors[0][1] * (1.0 - xtag_part) * ytag_part + (double) neighbors[1][0] * xtag_part * (1.0 - ytag_part) + (double) neighbors[1][1] * xtag_part * ytag_part; } /* get new point */ if (new_point > 0.5) ho_bitmap_set (m_out, x, y); } return m_out; } int ho_bitmap_pnm_save (const ho_bitmap * m, const char *filename) { FILE *file = NULL; file = fopen (filename, "wb"); if (!file) return TRUE; /* print header */ fprintf (file, "P4 %d %d\n", m->width, m->height); /* this might be a huge write... */ fwrite (m->data, 1, m->height * m->rowstride, file); fclose (file); return FALSE; } #ifdef USE_TIFF int ho_bitmap_tiff_save (const ho_bitmap * m, const char *filename) { TIFF *image; /* Open the TIFF file */ if((image = TIFFOpen(filename, "w")) == NULL) return TRUE; /* set some values */ TIFFSetField(image, TIFFTAG_IMAGEWIDTH, m->rowstride * 8); TIFFSetField(image, TIFFTAG_IMAGELENGTH, m->height); TIFFSetField(image, TIFFTAG_BITSPERSAMPLE, 1); TIFFSetField(image, TIFFTAG_SAMPLESPERPIXEL, 1); /* FIXME: strip limit is 65,536 pixels in a single strip ? */ TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, m->height); TIFFSetField(image, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4); TIFFSetField(image, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE); TIFFSetField(image, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB); TIFFSetField(image, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); TIFFSetField(image, TIFFTAG_XRESOLUTION, 300.0); TIFFSetField(image, TIFFTAG_YRESOLUTION, 300.0); TIFFSetField(image, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); /* Write the information to the file */ TIFFWriteEncodedStrip(image, 0, m->data, m->rowstride * m->height); /* Close the file */ TIFFClose(image); return FALSE; } #endif /* USE_TIFF */ libhocr-0.10.17/src/ho_recognize.h0000644000175000017500000002312511042333203013630 00000000000000 /*************************************************************************** * ho_recognize.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_recognize.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_RECOGNIZE_H #define HO_RECOGNIZE_H 1 #include #include #define HO_ARRAY_IN_SIZE 104 #define HO_ARRAY_OUT_SIZE 51 /* font shapes codes */ static const char *ho_sign_array[HO_ARRAY_OUT_SIZE] = { "*", "א", "ב", "ג", "ד", "ה", "ו", "ז", "ח", "ט", "י", "כ", "ך", "ל", "מ", "ם", "נ", "ן", "ס", "ע", "פ", "ף", "צ", "ץ", "ק", "ר", "ש", "ת", ".", ",", "'", "\"", "?", "!", ":", ";", ")", "(", "-", "+", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }; int ho_recognize_array_in_size (); int ho_recognize_array_out_size (); /* make array_in more readble */ #define HEIGHT (array_in[0]) #define WIDTH (array_in[1]) #define WIDTH_BY_HEIGHT (array_in[2]) #define TOP (array_in[3]) #define BOTTOM (array_in[4]) #define TOP_LEFT (array_in[5]) #define TOP_MID (array_in[6]) #define TOP_RIGHT (array_in[7]) #define MID_LEFT (array_in[8]) #define MID_RIGHT (array_in[9]) #define BOTTOM_LEFT (array_in[10]) #define BOTTOM_MID (array_in[11]) #define BOTTOM_RIGHT (array_in[12]) #define TWO_VLINES_UP (array_in[13]) #define TWO_VLINES_DOWN (array_in[14]) #define THREE_VLINES_UP (array_in[15]) #define THREE_VLINES_DOWN (array_in[16]) #define TOP_HBAR (array_in[17]) #define MID_HBAR (array_in[18]) #define BOTTOM_HBAR (array_in[19]) #define LEFT_VBAR (array_in[20]) #define MID_VBAR (array_in[21]) #define RIGHT_VBAR (array_in[22]) #define DIAGONAL_BAR (array_in[23]) #define DIAGONAL_LEFT_BAR (array_in[24]) #define TOP_LEFT_EDGE (array_in[25]) #define MID_LEFT_EDGE (array_in[26]) #define BOTTOM_LEFT_EDGE (array_in[27]) #define TOP_RIGTH_EDGE (array_in[28]) #define MID_RIGTH_EDGE (array_in[29]) #define BOTTOM_RIGTH_EDGE (array_in[30]) #define LEFT_TOP_EDGE (array_in[31]) #define MID_TOP_EDGE (array_in[32]) #define RIGHT_TOP_EDGE (array_in[33]) #define LEFT_BOTTOM_EDGE (array_in[34]) #define MID_BOTTOM_EDGE (array_in[35]) #define RIGHT_BOTTOM_EDGE (array_in[36]) #define TOP_LEFT_NOTCH (array_in[37]) #define MID_LEFT_NOTCH (array_in[38]) #define BOTTOM_LEFT_NOTCH (array_in[39]) #define TOP_RIGHT_NOTCH (array_in[40]) #define MID_RIGHT_NOTCH (array_in[41]) #define BOTTOM_RIGHT_NOTCH (array_in[42]) #define LEFT_TOP_NOTCH (array_in[43]) #define MID_TOP_NOTCH (array_in[44]) #define RIGHT_TOP_NOTCH (array_in[45]) #define LEFT_BOTTOM_NOTCH (array_in[46]) #define MID_BOTTOM_NOTCH (array_in[47]) #define RIGHT_BOTTOM_NOTCH (array_in[48]) #define TOP_LEFT_END (array_in[49]) #define TOP_MID_END (array_in[50]) #define TOP_RIGHT_END (array_in[51]) #define MID_LEFT_END (array_in[52]) #define MID_MID_END (array_in[53]) #define MID_RIGHT_END (array_in[54]) #define BOTTOM_LEFT_END (array_in[55]) #define BOTTOM_MID_END (array_in[56]) #define BOTTOM_RIGHT_END (array_in[57]) #define TOP_LEFT_CROSS (array_in[58]) #define TOP_MID_CROSS (array_in[59]) #define TOP_RIGHT_CROSS (array_in[60]) #define MID_LEFT_CROSS (array_in[61]) #define MID_MID_CROSS (array_in[62]) #define MID_RIGHT_CROSS (array_in[63]) #define BOTTOM_LEFT_CROSS (array_in[64]) #define BOTTOM_MID_CROSS (array_in[65]) #define BOTTOM_RIGHT_CROSS (array_in[66]) #define ONE_HOLE (array_in[67]) #define TWO_HOLES (array_in[68]) #define HEY_PART (array_in[69]) #define DOT_PART (array_in[70]) #define COMMA_PART (array_in[71]) #define HOLE_TOP_LEFT_EDGE (array_in[72]) #define HOLE_MID_LEFT_EDGE (array_in[73]) #define HOLE_BOTTOM_LEFT_EDGE (array_in[74]) #define HOLE_TOP_RIGTH_EDGE (array_in[75]) #define HOLE_MID_RIGTH_EDGE (array_in[76]) #define HOLE_BOTTOM_RIGTH_EDGE (array_in[77]) #define HOLE_LEFT_TOP_EDGE (array_in[78]) #define HOLE_MID_TOP_EDGE (array_in[79]) #define HOLE_RIGHT_TOP_EDGE (array_in[80]) #define HOLE_LEFT_BOTTOM_EDGE (array_in[81]) #define HOLE_MID_BOTTOM_EDGE (array_in[82]) #define HOLE_RIGHT_BOTTOM_EDGE (array_in[83]) #define HOLE_HEIGHT (array_in[84]) #define HOLE_WIDTH (array_in[85]) #define HOLE_TOP (array_in[86]) #define HOLE_BOTTOM (array_in[87]) #define HOLE_TOP_LEFT (array_in[88]) #define HOLE_TOP_RIGHT (array_in[89]) #define HOLE_BOTTOM_LEFT (array_in[90]) #define HOLE_BOTTOM_RIGHT (array_in[91]) #define BIG_TOP_LEFT_EDGE (array_in[92]) #define BIG_MID_LEFT_EDGE (array_in[93]) #define BIG_BOTTOM_LEFT_EDGE (array_in[94]) #define BIG_TOP_RIGTH_EDGE (array_in[95]) #define BIG_MID_RIGTH_EDGE (array_in[96]) #define BIG_BOTTOM_RIGTH_EDGE (array_in[97]) #define BIG_LEFT_TOP_EDGE (array_in[98]) #define BIG_MID_TOP_EDGE (array_in[99]) #define BIG_RIGHT_TOP_EDGE (array_in[100]) #define BIG_LEFT_BOTTOM_EDGE (array_in[101]) #define BIG_MID_BOTTOM_EDGE (array_in[102]) #define BIG_RIGHT_BOTTOM_EDGE (array_in[103]) int ho_recognize_create_array_in (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *array_in); int ho_recognize_create_array_out (const double *array_in, double *array_out, int font_code); const char *ho_recognize_array_out_to_font (const double *array_out, int *this_char_i); const char *ho_recognize_font (const ho_bitmap * m_text, const ho_bitmap * m_mask, int font_code, unsigned char do_linguistics, unsigned char word_end, unsigned char word_start, int *this_char_i, int last_char_i); int ho_recognize_dimentions (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *height, double *width, double *top, double *bottom, double *top_left, double *top_mid, double *top_right, double *mid_left, double *mid_right, double *bottom_left, double *bottom_mid, double *bottom_right, double *has_two_hlines_up, double *has_two_hlines_down, double *has_three_hlines_up, double *has_three_hlines_down); int ho_recognize_bars (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_bar, double *has_mid_hbar, double *has_bottom_bar, double *has_left_bar, double *has_mid_vbar, double *has_right_bar, double *has_diagonal_bar, double *has_diagonal_left_bar); int ho_recognize_edges (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_edge, double *has_mid_left_edge, double *has_bottom_left_edge, double *has_top_right_edge, double *has_mid_right_edge, double *has_bottom_right_edge, double *has_left_top_edge, double *has_mid_top_edge, double *has_right_top_edge, double *has_left_bottom_edge, double *has_mid_bottom_edge, double *has_right_bottom_edge); int ho_recognize_edges_big (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_edge, double *has_mid_left_edge, double *has_bottom_left_edge, double *has_top_right_edge, double *has_mid_right_edge, double *has_bottom_right_edge, double *has_left_top_edge, double *has_mid_top_edge, double *has_right_top_edge, double *has_left_bottom_edge, double *has_mid_bottom_edge, double *has_right_bottom_edge); int ho_recognize_notches (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_notch, double *has_mid_left_notch, double *has_bottom_left_notch, double *has_top_right_notch, double *has_mid_right_notch, double *has_bottom_right_notch, double *has_left_top_notch, double *has_mid_top_notch, double *has_right_top_notch, double *has_left_bottom_notch, double *has_mid_bottom_notch, double *has_right_bottom_notch); int ho_recognize_parts (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_one_hole, double *has_two_holes, double *has_hey_part, double *has_dot_part, double *has_comma_part); int ho_recognize_ends (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_end, double *has_top_mid_end, double *has_top_right_end, double *has_mid_left_end, double *has_mid_mid_end, double *has_mid_right_end, double *has_bottom_left_end, double *has_bottom_mid_end, double *has_bottom_right_end, double *has_top_left_cross, double *has_top_mid_cross, double *has_top_right_cross, double *has_mid_left_cross, double *has_mid_mid_cross, double *has_mid_right_cross, double *has_bottom_left_cross, double *has_bottom_mid_cross, double *has_bottom_right_cross); int ho_recognize_holes_dimentions (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *height, double *width, double *top, double *bottom, double *top_left, double *top_right, double *bottom_left, double *bottom_right); int ho_recognize_holes_edges (const ho_bitmap * m_text, const ho_bitmap * m_mask, double *has_top_left_edge, double *has_mid_left_edge, double *has_bottom_left_edge, double *has_top_right_edge, double *has_mid_right_edge, double *has_bottom_right_edge, double *has_left_top_edge, double *has_mid_top_edge, double *has_right_top_edge, double *has_left_bottom_edge, double *has_mid_bottom_edge, double *has_right_bottom_edge); #endif /* HO_RECOGNIZE_H */ libhocr-0.10.17/src/ho_layout.h0000644000175000017500000001406011044117253013165 00000000000000 /*************************************************************************** * ho_layout.h * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2007 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** @file ho_layout.h @brief libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition */ #ifndef HO_LAYOUT_H #define HO_LAYOUT_H 1 #include #include /** @struct ho_layout @brief libhocr layout struct */ typedef struct { /* paragraph settings type */ char font_spacing_code; unsigned char type; unsigned char dir; int number_of_fonts; /* black and white text image */ ho_bitmap *m_page_text; ho_bitmap *m_page_blocks_mask; /* line text and masks arrays [number of text blocks] */ int n_blocks; ho_bitmap **m_blocks_text; ho_bitmap **m_blocks_lines_mask; /* words text and masks arrays [number of text blocks][number of lines in * block] */ int *n_lines; ho_bitmap ***m_lines_text; ho_bitmap ***m_lines_line_mask; ho_bitmap ***m_lines_words_mask; /* number of words in a line */ int **n_words; ho_bitmap ****m_words_text; ho_bitmap ****m_words_line_mask; ho_bitmap ****m_words_font_mask; int ***n_fonts; } ho_layout; /** new ho_layout @param m_page_text a pointer to a text bitmap @param font_spacing_code -3 tight .. 0 .. 3 spaced @param type free text blocks or boxed @param dir true-ltr false-rtl @return a newly allocated layout */ ho_layout *ho_layout_new (const ho_bitmap * m_page_text, const char font_spacing_code, const unsigned char type, const unsigned char dir); /** free a ho_layout @param l_page a pointer to a ho_layout @return FALSE */ int ho_layout_free (ho_layout * l_page); /** create a text blocks mask and count blocks in n_blocks @param l_page a pointer to a ho_layout @return FALSE */ int ho_layout_create_block_mask (ho_layout * l_page); /** create a text lines mask and count lines in n_lines[block_index] @param l_page a pointer to a ho_layout @param block_index the block_index to work on @return FALSE */ int ho_layout_create_line_mask (ho_layout * l_page, const int block_index); /** create a text word mask and count words in n_words[block_index][line_index] @param l_page a pointer to a ho_layout @param block_index the block_index to work on @param line_index the line_index to work on @return FALSE */ int ho_layout_create_word_mask (ho_layout * l_page, const int block_index, const int line_index); /** create a text font mask and count fonts in n_fontss[block_index][line_index][word_index] @param l_page a pointer to a ho_layout @param block_index the block_index to work on @param line_index the line_index to work on @param word_index the word_index to work on @param slicing_threshold the slicing threshold @param slicing_width the slicing width @param line_leeway the line leeway below and above line @return FALSE */ int ho_layout_create_font_mask (ho_layout * l_page, const int block_index, const int line_index, const int word_index, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway); /** new ho_bitamp of the text in a layout block @param l_page the ho_layout to use @param block_index block index @return newly allocated ho_bitmap */ ho_bitmap *ho_layout_get_block_text (const ho_layout * l_page, int block_index); /** new ho_bitamp of the text in a layout line @param l_page the ho_layout to use @param block_index block index @param line_index line index @return newly allocated ho_bitmap */ ho_bitmap *ho_layout_get_line_text (const ho_layout * l_page, int block_index, int line_index); /** new ho_bitamp of the text in a layout word @param l_page the ho_layout to use @param block_index block index @param line_index line index @param word_index word index @return newly allocated ho_bitmap */ ho_bitmap *ho_layout_get_word_text (const ho_layout * l_page, int block_index, int line_index, int word_index); /** new ho_bitamp of the text in a layout font @param l_page the ho_layout to use @param block_index block index @param line_index line index @param word_index word index @param font_index font index @return newly allocated ho_bitmap */ ho_bitmap *ho_layout_get_font_text (const ho_layout * l_page, int block_index, int line_index, int word_index, int font_index); /** new ho_bitamp of the line in a layout line @param l_page the ho_layout to use @param block_index block index @param line_index line index @return newly allocated ho_bitmap */ ho_bitmap *ho_layout_get_line_line_mask (const ho_layout * l_page, int block_index, int line_index); /** new ho_bitamp of the line in a layout word @param l_page the ho_layout to use @param block_index block index @param line_index line index @param word_index word index @return newly allocated ho_bitmap */ ho_bitmap *ho_layout_get_word_line_mask (const ho_layout * l_page, int block_index, int line_index, int word_index); /** new ho_bitamp of the line in a layout font @param l_page the ho_layout to use @param block_index block index @param line_index line index @param word_index word index @param font_index font index @return newly allocated ho_bitmap */ ho_bitmap *ho_layout_get_font_line_mask (const ho_layout * l_page, int block_index, int line_index, int word_index, int font_index); #endif /* HO_LAYOUT_H */ libhocr-0.10.17/configure0000755000175000017500000257453511051626304012155 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for libhocr 0.10.17. # # Report bugs to >. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # 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 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='libhocr' PACKAGE_TARNAME='libhocr' PACKAGE_VERSION='0.10.17' PACKAGE_STRING='libhocr 0.10.17' PACKAGE_BUGREPORT='Yaacov Zamir ' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os SED GREP EGREP LN_S ECHO AR RANLIB DSYMUTIL NMEDIT CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG LINUX_HOST_TRUE LINUX_HOST_FALSE MINGW_HOST_TRUE MINGW_HOST_FALSE DARWIN_HOST_TRUE DARWIN_HOST_FALSE have_swig tiff_CFLAGS tiff_LIBS ld_tiff WITH_TIFF_TRUE WITH_TIFF_FALSE fftw_CFLAGS fftw_LIBS WITH_FFTW_TRUE WITH_FFTW_FALSE glib_CFLAGS glib_LIBS WITH_GLIB_TRUE WITH_GLIB_FALSE gtk_CFLAGS gtk_LIBS requires_gtk WITH_GTK_TRUE WITH_GTK_FALSE PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir PY_CFLAGS PY_MODULES_PATH WITH_PYTHON_TRUE WITH_PYTHON_FALSE hspell_CFLAGS hspell_LIBS ld_hspell WITH_HSPELL_TRUE WITH_HSPELL_FALSE WITH_HOCR_TRUE WITH_HOCR_FALSE WITH_HOCR_GTK_TRUE WITH_HOCR_GTK_FALSE BUILD_STR LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS PKG_CONFIG fftw_CFLAGS fftw_LIBS glib_CFLAGS glib_LIBS gtk_CFLAGS gtk_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libhocr 0.10.17 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/libhocr] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libhocr 0.10.17:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-tiff do not use libtiff --disable-fftw do not use fftw --disable-glib do not use glib --disable-gtk do not use gtk --disable-python do not build python binding --disable-hspell do not use hspell --disable-hocr do not build hocr utility program --disable-hocr-gtk do not build hocr-gtk utility program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-python-sitelib-dir=PATH path to python site lib Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags PKG_CONFIG path to pkg-config utility fftw_CFLAGS C compiler flags for fftw, overriding pkg-config fftw_LIBS linker flags for fftw, overriding pkg-config glib_CFLAGS C compiler flags for glib, overriding pkg-config glib_LIBS linker flags for glib, overriding pkg-config gtk_CFLAGS C compiler flags for gtk, overriding pkg-config gtk_LIBS linker flags for gtk, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to >. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF libhocr configure 0.10.17 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libhocr $as_me 0.10.17, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5 echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.10' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='libhocr' VERSION='0.10.17' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 4389 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------------ ## ## Report this to Yaacov Zamir ## ## ------------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 echo "${ECHO_T}$DSYMUTIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { echo "$as_me:$LINENO: result: $NMEDIT" >&5 echo "${ECHO_T}$NMEDIT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_ld_exported_symbols_list=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7446: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7450: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7736: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7740: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7840: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7844: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs=no else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext compiler_lib_search_dirs_CXX= if test -n "$compiler_lib_search_path_CXX"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12718: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12722: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12822: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:12826: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14420: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14424: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14524: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14528: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_F77=no else ld_shlibs_F77=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16744: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16748: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17034: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17038: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17138: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:17142: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_GCJ=no else ld_shlibs_GCJ=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi host_code=1 case ${host} in *linux*) host_code=1 ;; *mingw32*) host_code=2 ;; *darwin*) host_code=3 ;; esac if test $host_code = 1 ; then LINUX_HOST_TRUE= LINUX_HOST_FALSE='#' else LINUX_HOST_TRUE='#' LINUX_HOST_FALSE= fi if test $host_code = 2 ; then MINGW_HOST_TRUE= MINGW_HOST_FALSE='#' else MINGW_HOST_TRUE='#' MINGW_HOST_FALSE= fi if test $host_code = 3 ; then DARWIN_HOST_TRUE= DARWIN_HOST_FALSE='#' else DARWIN_HOST_TRUE='#' DARWIN_HOST_FALSE= fi # Extract the first word of ""swig"", so it can be a program name with args. set dummy "swig"; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_have_swig+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$have_swig"; then ac_cv_prog_have_swig="$have_swig" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_swig="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_swig" && ac_cv_prog_have_swig="no" fi fi have_swig=$ac_cv_prog_have_swig if test -n "$have_swig"; then { echo "$as_me:$LINENO: result: $have_swig" >&5 echo "${ECHO_T}$have_swig" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi build_tiff=yes # Check whether --enable-tiff was given. if test "${enable_tiff+set}" = set; then enableval=$enable_tiff; build_tiff=no else build_tiff=yes fi if test "$build_tiff" = "yes"; then { echo "$as_me:$LINENO: checking for TIFFOpen in -ltiff" >&5 echo $ECHO_N "checking for TIFFOpen in -ltiff... $ECHO_C" >&6; } if test "${ac_cv_lib_tiff_TIFFOpen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltiff $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char TIFFOpen (); int main () { return TIFFOpen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_tiff_TIFFOpen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_tiff_TIFFOpen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFOpen" >&5 echo "${ECHO_T}$ac_cv_lib_tiff_TIFFOpen" >&6; } if test $ac_cv_lib_tiff_TIFFOpen = yes; then build_tiff=yes else build_tiff=no fi if test "$build_tiff" = "yes"; then tiff_CFLAGS=" -DUSE_TIFF" tiff_LIBS=" -ltiff" ld_tiff="$tiff_LIBS" fi fi if test "$build_tiff" = yes; then WITH_TIFF_TRUE= WITH_TIFF_FALSE='#' else WITH_TIFF_TRUE='#' WITH_TIFF_FALSE= fi build_fftw=yes # Check whether --enable-fftw was given. if test "${enable_fftw+set}" = set; then enableval=$enable_fftw; build_fftw=no else build_fftw=yes fi if test "$build_fftw" = "yes"; then fftw_pkg_modules="fftw3" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { echo "$as_me:$LINENO: checking for fftw" >&5 echo $ECHO_N "checking for fftw... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$fftw_CFLAGS"; then pkg_cv_fftw_CFLAGS="$fftw_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$fftw_pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$fftw_pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_fftw_CFLAGS=`$PKG_CONFIG --cflags "$fftw_pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$fftw_LIBS"; then pkg_cv_fftw_LIBS="$fftw_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$fftw_pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$fftw_pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_fftw_LIBS=`$PKG_CONFIG --libs "$fftw_pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then fftw_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$fftw_pkg_modules"` else fftw_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$fftw_pkg_modules"` fi # Put the nasty error message in config.log where it belongs echo "$fftw_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } build_fftw=no elif test $pkg_failed = untried; then build_fftw=no else fftw_CFLAGS=$pkg_cv_fftw_CFLAGS fftw_LIBS=$pkg_cv_fftw_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } build_fftw=yes fi if test "$build_fftw" = "yes"; then fftw_CFLAGS+=" -DUSE_FFTW" fi fi if test "$build_fftw" = yes; then WITH_FFTW_TRUE= WITH_FFTW_FALSE='#' else WITH_FFTW_TRUE='#' WITH_FFTW_FALSE= fi build_lib=yes # Check whether --enable-glib was given. if test "${enable_glib+set}" = set; then enableval=$enable_glib; build_glib=no else build_glib=yes fi if test "$build_glib" = "yes"; then glib_pkg_modules="glib-2.0" pkg_failed=no { echo "$as_me:$LINENO: checking for glib" >&5 echo $ECHO_N "checking for glib... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$glib_CFLAGS"; then pkg_cv_glib_CFLAGS="$glib_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$glib_pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$glib_pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_glib_CFLAGS=`$PKG_CONFIG --cflags "$glib_pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$glib_LIBS"; then pkg_cv_glib_LIBS="$glib_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$glib_pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$glib_pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_glib_LIBS=`$PKG_CONFIG --libs "$glib_pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then glib_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$glib_pkg_modules"` else glib_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$glib_pkg_modules"` fi # Put the nasty error message in config.log where it belongs echo "$glib_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } build_glib=no elif test $pkg_failed = untried; then build_glib=no else glib_CFLAGS=$pkg_cv_glib_CFLAGS glib_LIBS=$pkg_cv_glib_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } build_glib=yes fi if test "$build_glib" = "yes"; then glib_CFLAGS+=" -DUSE_GLIB" fi fi if test "$build_glib" = yes; then WITH_GLIB_TRUE= WITH_GLIB_FALSE='#' else WITH_GLIB_TRUE='#' WITH_GLIB_FALSE= fi build_gtk=yes # Check whether --enable-gtk was given. if test "${enable_gtk+set}" = set; then enableval=$enable_gtk; build_gtk=no else build_gtk=yes fi if test "$build_gtk" = "yes"; then gtk_pkg_modules="gtk+-2.0" pkg_failed=no { echo "$as_me:$LINENO: checking for gtk" >&5 echo $ECHO_N "checking for gtk... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$gtk_CFLAGS"; then pkg_cv_gtk_CFLAGS="$gtk_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$gtk_pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$gtk_pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_gtk_CFLAGS=`$PKG_CONFIG --cflags "$gtk_pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$gtk_LIBS"; then pkg_cv_gtk_LIBS="$gtk_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$gtk_pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$gtk_pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_gtk_LIBS=`$PKG_CONFIG --libs "$gtk_pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then gtk_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$gtk_pkg_modules"` else gtk_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$gtk_pkg_modules"` fi # Put the nasty error message in config.log where it belongs echo "$gtk_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } build_gtk=no elif test $pkg_failed = untried; then build_gtk=no else gtk_CFLAGS=$pkg_cv_gtk_CFLAGS gtk_LIBS=$pkg_cv_gtk_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } build_gtk=yes fi if test "$build_gtk" = "yes"; then gtk_CFLAGS+=" -DUSE_GTK" requires_gtk="$gtk_pkg_modules" fi fi if test "$build_gtk" = yes; then WITH_GTK_TRUE= WITH_GTK_FALSE='#' else WITH_GTK_TRUE='#' WITH_GTK_FALSE= fi if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.5" >&5 echo $ECHO_N "checking whether $PYTHON version >= 2.5... $ECHO_C" >&6; } prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('2.5', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { { echo "$as_me:$LINENO: error: too old" >&5 echo "$as_me: error: too old" >&2;} { (exit 1); exit 1; }; } fi am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.5" >&5 echo $ECHO_N "checking for a Python interpreter with version >= 2.5... $ECHO_C" >&6; } if test "${am_cv_pathless_PYTHON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('2.5', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then break fi done fi { echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5 echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { echo "$as_me:$LINENO: result: $PYTHON" >&5 echo "${ECHO_T}$PYTHON" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then have_python=no else { echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; } if test "${am_cv_python_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` fi { echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 echo "${ECHO_T}$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6; } if test "${am_cv_python_platform+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi { echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 echo "${ECHO_T}$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform { echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6; } if test "${am_cv_python_pythondir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` fi { echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 echo "${ECHO_T}$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6; } if test "${am_cv_python_pyexecdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` fi { echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE have_python=yes fi build_python=$have_python # Check whether --enable-python was given. if test "${enable_python+set}" = set; then enableval=$enable_python; build_python=no else build_python=$have_python fi # Check whether --with-python-sitelib-dir was given. if test "${with_python_sitelib_dir+set}" = set; then withval=$with_python_sitelib_dir; fi if test "$have_python" = "yes"; then PY_PREFIX=`python -c 'import sys ; print sys.prefix'` { echo "$as_me:$LINENO: checking for $PY_PREFIX/include/python${PYTHON_VERSION}/Python.h" >&5 echo $ECHO_N "checking for $PY_PREFIX/include/python${PYTHON_VERSION}/Python.h... $ECHO_C" >&6; } if test -f $PY_PREFIX/include/python${PYTHON_VERSION}/Python.h; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } PY_CFLAGS="-I$PY_PREFIX/include/python${PYTHON_VERSION}" if test "$with_python_sitelib_dir" = "" ; then PY_MODULES_PATH=$pythondir else PY_MODULES_PATH=$with_python_sitelib_dir fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } build_python=no fi fi if test "$have_swig" = "no"; then build_python=no fi if test "$build_tiff" = "no"; then build_python=no fi if test "$build_fftw" = "no"; then build_python=no fi if test "$build_python" = "yes"; then WITH_PYTHON_TRUE= WITH_PYTHON_FALSE='#' else WITH_PYTHON_TRUE='#' WITH_PYTHON_FALSE= fi build_hspell=yes # Check whether --enable-hspell was given. if test "${enable_hspell+set}" = set; then enableval=$enable_hspell; build_hspell=no else build_hspell=yes fi if test "$build_hspell" = "yes"; then { echo "$as_me:$LINENO: checking for hspell_get_dictionary_path in -lhspell" >&5 echo $ECHO_N "checking for hspell_get_dictionary_path in -lhspell... $ECHO_C" >&6; } if test "${ac_cv_lib_hspell_hspell_get_dictionary_path+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhspell -lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char hspell_get_dictionary_path (); int main () { return hspell_get_dictionary_path (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_hspell_hspell_get_dictionary_path=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_hspell_hspell_get_dictionary_path=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_hspell_hspell_get_dictionary_path" >&5 echo "${ECHO_T}$ac_cv_lib_hspell_hspell_get_dictionary_path" >&6; } if test $ac_cv_lib_hspell_hspell_get_dictionary_path = yes; then build_hspell=yes else build_hspell=no fi if test "$build_hspell" = "yes"; then hspell_CFLAGS=" -DUSE_HSPELL" hspell_LIBS=" -lhspell -lz" ld_hspell="$hspell_LIBS" fi fi if test "$build_hspell" = yes; then WITH_HSPELL_TRUE= WITH_HSPELL_FALSE='#' else WITH_HSPELL_TRUE='#' WITH_HSPELL_FALSE= fi build_hocr=yes # Check whether --enable-hocr was given. if test "${enable_hocr+set}" = set; then enableval=$enable_hocr; build_hocr=no else build_hocr=yes fi if test "$build_glib" = "no"; then build_hocr=no fi if test "$build_hocr" = "yes"; then WITH_HOCR_TRUE= WITH_HOCR_FALSE='#' else WITH_HOCR_TRUE='#' WITH_HOCR_FALSE= fi build_hocr_gtk=yes # Check whether --enable-hocr-gtk was given. if test "${enable_hocr_gtk+set}" = set; then enableval=$enable_hocr_gtk; build_hocr_gtk=no else build_hocr_gtk=yes fi if test "$build_python" = "no"; then build_hocr_gtk=no fi if test "$build_hocr_gtk" = "yes"; then WITH_HOCR_GTK_TRUE= WITH_HOCR_GTK_FALSE='#' else WITH_HOCR_GTK_TRUE='#' WITH_HOCR_GTK_FALSE= fi BUILD_DATE=`date +%d%m%Y` BUILD_STR="$PACKAGE-$VERSION-$build-$BUILD_DATE" if test "$build_tiff" = "yes"; then BUILD_STR+="-tiff" fi if test "$build_fftw" = "yes"; then BUILD_STR+="-fftw3" fi if test "$build_hspell" = "yes"; then BUILD_STR+="-hspell" fi if test "$build_gtk" = "yes"; then BUILD_STR+="-gtk" fi ac_config_files="$ac_config_files Makefile libhocr.pc libhocr-gtk.pc Doxyfile src/Makefile examples/Makefile examples/hocr/Makefile examples/hocr-gtk/Makefile examples/bindings/Makefile bindings/Makefile bindings/python/Makefile docs/Makefile docs/man/Makefile docs/man/man1/Makefile docs/man/man3/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${LINUX_HOST_TRUE}" && test -z "${LINUX_HOST_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"LINUX_HOST\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"LINUX_HOST\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${MINGW_HOST_TRUE}" && test -z "${MINGW_HOST_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MINGW_HOST\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MINGW_HOST\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DARWIN_HOST_TRUE}" && test -z "${DARWIN_HOST_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DARWIN_HOST\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DARWIN_HOST\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITH_TIFF_TRUE}" && test -z "${WITH_TIFF_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITH_TIFF\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITH_TIFF\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITH_FFTW_TRUE}" && test -z "${WITH_FFTW_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITH_FFTW\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITH_FFTW\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITH_GLIB_TRUE}" && test -z "${WITH_GLIB_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITH_GLIB\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITH_GLIB\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITH_GTK_TRUE}" && test -z "${WITH_GTK_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITH_GTK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITH_GTK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITH_PYTHON_TRUE}" && test -z "${WITH_PYTHON_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITH_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITH_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITH_HSPELL_TRUE}" && test -z "${WITH_HSPELL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITH_HSPELL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITH_HSPELL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITH_HOCR_TRUE}" && test -z "${WITH_HOCR_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITH_HOCR\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITH_HOCR\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITH_HOCR_GTK_TRUE}" && test -z "${WITH_HOCR_GTK_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WITH_HOCR_GTK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WITH_HOCR_GTK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # 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 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by libhocr $as_me 0.10.17, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ libhocr config.status 0.10.17 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "libhocr.pc") CONFIG_FILES="$CONFIG_FILES libhocr.pc" ;; "libhocr-gtk.pc") CONFIG_FILES="$CONFIG_FILES libhocr-gtk.pc" ;; "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/hocr/Makefile") CONFIG_FILES="$CONFIG_FILES examples/hocr/Makefile" ;; "examples/hocr-gtk/Makefile") CONFIG_FILES="$CONFIG_FILES examples/hocr-gtk/Makefile" ;; "examples/bindings/Makefile") CONFIG_FILES="$CONFIG_FILES examples/bindings/Makefile" ;; "bindings/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/Makefile" ;; "bindings/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/python/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/Makefile" ;; "docs/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/man1/Makefile" ;; "docs/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/man3/Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim SED!$SED$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim DSYMUTIL!$DSYMUTIL$ac_delim NMEDIT!$NMEDIT$ac_delim CPP!$CPP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim LINUX_HOST_TRUE!$LINUX_HOST_TRUE$ac_delim LINUX_HOST_FALSE!$LINUX_HOST_FALSE$ac_delim MINGW_HOST_TRUE!$MINGW_HOST_TRUE$ac_delim MINGW_HOST_FALSE!$MINGW_HOST_FALSE$ac_delim DARWIN_HOST_TRUE!$DARWIN_HOST_TRUE$ac_delim DARWIN_HOST_FALSE!$DARWIN_HOST_FALSE$ac_delim have_swig!$have_swig$ac_delim tiff_CFLAGS!$tiff_CFLAGS$ac_delim tiff_LIBS!$tiff_LIBS$ac_delim ld_tiff!$ld_tiff$ac_delim WITH_TIFF_TRUE!$WITH_TIFF_TRUE$ac_delim WITH_TIFF_FALSE!$WITH_TIFF_FALSE$ac_delim fftw_CFLAGS!$fftw_CFLAGS$ac_delim fftw_LIBS!$fftw_LIBS$ac_delim WITH_FFTW_TRUE!$WITH_FFTW_TRUE$ac_delim WITH_FFTW_FALSE!$WITH_FFTW_FALSE$ac_delim glib_CFLAGS!$glib_CFLAGS$ac_delim glib_LIBS!$glib_LIBS$ac_delim WITH_GLIB_TRUE!$WITH_GLIB_TRUE$ac_delim WITH_GLIB_FALSE!$WITH_GLIB_FALSE$ac_delim gtk_CFLAGS!$gtk_CFLAGS$ac_delim gtk_LIBS!$gtk_LIBS$ac_delim requires_gtk!$requires_gtk$ac_delim WITH_GTK_TRUE!$WITH_GTK_TRUE$ac_delim WITH_GTK_FALSE!$WITH_GTK_FALSE$ac_delim PYTHON!$PYTHON$ac_delim PYTHON_VERSION!$PYTHON_VERSION$ac_delim PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim PYTHON_EXEC_PREFIX!$PYTHON_EXEC_PREFIX$ac_delim PYTHON_PLATFORM!$PYTHON_PLATFORM$ac_delim pythondir!$pythondir$ac_delim pkgpythondir!$pkgpythondir$ac_delim pyexecdir!$pyexecdir$ac_delim pkgpyexecdir!$pkgpyexecdir$ac_delim PY_CFLAGS!$PY_CFLAGS$ac_delim PY_MODULES_PATH!$PY_MODULES_PATH$ac_delim WITH_PYTHON_TRUE!$WITH_PYTHON_TRUE$ac_delim WITH_PYTHON_FALSE!$WITH_PYTHON_FALSE$ac_delim hspell_CFLAGS!$hspell_CFLAGS$ac_delim hspell_LIBS!$hspell_LIBS$ac_delim ld_hspell!$ld_hspell$ac_delim WITH_HSPELL_TRUE!$WITH_HSPELL_TRUE$ac_delim WITH_HSPELL_FALSE!$WITH_HSPELL_FALSE$ac_delim WITH_HOCR_TRUE!$WITH_HOCR_TRUE$ac_delim WITH_HOCR_FALSE!$WITH_HOCR_FALSE$ac_delim WITH_HOCR_GTK_TRUE!$WITH_HOCR_GTK_TRUE$ac_delim WITH_HOCR_GTK_FALSE!$WITH_HOCR_GTK_FALSE$ac_delim BUILD_STR!$BUILD_STR$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi echo echo $PACKAGE $VERSION - Hebrew Optical Character Recognition library echo OS: ${host} echo build: $BUILD_STR echo prefix: $prefix echo compiler: ${CC} echo have swig: ${have_swig} echo pkg-config path: ${PKG_CONFIG} echo echo with glib: ${build_glib} echo with gtk: ${build_gtk} echo with hspell: ${build_hspell} echo with libtiff: ${build_tiff} echo with fftw: ${build_fftw} echo echo build python binding, requires swig, libtiff, fftw: ${build_python} echo python site lib path: ${PY_MODULES_PATH} echo echo build hocr, requires glib, suggests gtk: ${build_hocr} echo build hocr-gtk, requires python bindings: ${build_hocr_gtk} echo libhocr-0.10.17/ChangeLog0000644000175000017500000002366011051623734012006 00000000000000libhocr (0.10.17) * Font recognition fine tuning * Add tiff and jpeg formats output to hocr utility * Add left to right options to hocr and hocr-gtk utilities * Oron Peled : - Fix hocr-gtk and sane-pygtk desktop files - Fix pkg-config files - code cleanups: missings includes and unused vars -- Yaacov Zamir Monday, 27 July 2008 09:04 libhocr (0.10.16) * Update hocr-gtk Hebrew translation * Add dilation and erosion to hocrpp.h * Re Fix python install scripts -- Yaacov Zamir Monday, 22 July 2008 09:04 libhocr (0.10.13) * Oron Peled : - Fix errors in examples/hocr-gtk/sane-pygtk.desktop - Fix naming in examples/bindings/Makefile.am - Use AM_PATH_PYTHON in configure.ac * Add more options to hocr-gtk -- Yaacov Zamir Monday, 21 July 2008 09:04 libhocr (0.10.12) * Fix font segmentation when fonts overlap * Re change defaults for image prossecing * Fix font slicing bug * Sync hocr-gtk and hocr version numbers with libhocr version number * Fix memory leaks in hocr-gtk * Fix gtk pixbuf save extention problem -- Yaacov Zamir Thursday, 06 July 2008 09:04 libhocr (0.10.11) * Change default values in hocr command line utility * Change default values in hocr-gtk graphical utility * Add scale and threshold settings to OO c++ and python bindings -- Yaacov Zamir Thursday, 26 June 2008 09:04 libhocr (0.10.10) * Fix hocr-gtk example remember window size * Fix hocr-gtk example show image filename in title * hocr-gtk example requires python bindings * add an ho_array object for arithmetic based operations * add an ho_array_hist helper object for ho_array * add an ho_array_stat helper object for ho_array's statistics * add ah ho_bitmap_hist helper object for ho_bitmap * Fix libhocrgtk build on none gtk systems (Bug report: Nadav Mavor) -- Yaacov Zamir Sunday, 10 May 2008 09:04 libhocr (0.10.9) * Re-Fix auto scaling bug -- Yaacov Zamir Thursday, 8 May 2008 09:04 libhocr (0.10.8) * Fix auto scaling bug * Refine david font -- Yaacov Zamir Thursday, 8 May 2008 09:04 libhocr (0.10.7) * hocr-gtk save session parameters * remove .py from hocr-gtk example python scripts file names * use libtiff for black and white hocr-pixbuf export and import using tiff format * hocr example can read black and white tiff image files without using gtk * use sane-pygtk as the scanner utility * make the configure script more flexible -- Yaacov Zamir Thursday, 24 Apr 2008 09:04 libhocr (0.10.6) * hocr-gtk example less path dependent (use sys.prefix) * hocr-gtk example can use tesseract-ocr if present * hocr-gtk example can use python-imaging-sane if present to scan images from a scanner * use libtiff for hocr-bitmap export using tiff format * python-hocr does not include hocr-gtk -- Yaacov Zamir Wednesday, 22 Apr 2008 21:04 libhocr (0.10.5) * fine tune font recognition * add wrapper functions * add c++ wrapper class * add hocr-gtk example (using glade, pygtk and hocr-python) -- Yaacov Zamir Saturday, 26 Jan 2008 21:04 libhocr (0.10.4) * change licence to GPL3 * fine tune options for segmentation functions * fine tune reading order functions * remove web interface * fix pbm load bug (patch: Mikael Ylikoski ) * add rotation functions * re-add examples (hocr example requers gtk) * re-add python bindings (now requires gtk) -- Yaacov Zamir Monday, 14 May 2007 18:12 libhocr (0.10.3) * font segmentation functions * font recognition functions -- Yaacov Zamir Monday, 4 March 2007 12:02 libhocr (0.10.2) * paragraph segmentation functions * line segmentation functions * word segmentation functions * reading order sorting functions * add php web interface -- Yaacov Zamir Thursday, 15 February 2007 19:12 libhocr (0.10.1) * internal image loader can load pnm P6, P5, P4 images * internal image saver can save pnm P6, P5 images * new functions for color and gray scale images * gtk related functions move to libhocrgtk -- Yaacov Zamir Tuesday, 16 Jan 2007 20:10 libhocr (0.10.0) * new API * a code cleanup (re-write of most of the code): re-write of object/struct definitions. re-write of the segmentation and recognition functions. re-write of the input-output functions. file re-organization and naming. * temporarily remove bindings and examples. * hocr command line utility requires gtk for input and output -- Yaacov Zamir Sun, 25 Jun 2006 22:13 hocr (0.8.2) * change g_file_set_contents to simple fprintf call in file examples/hocr-gtk/callbacks.c * add hspell backend to hocr_textbuffer * add glib's Character Set Conversion support to hocr_textbuffer * add glib's File save support to hocr_textbuffer * add gtk's open/save picture files to hocr_pixbuf. * default brightness is 128 now * new and preetier logo by Shlomi * Daniel Nylander: swedish Swedish translation of hocr-gtk -- Yaacov Zamir Sun, 15 Jan 2006 22:13 hocr (0.8.0) * Shlomi Israel: hocr logo. * Tal. (tal.bav_at_gmail.com): Fix memory leak when unrefing the text structure -- Yaacov Zamir Sat, 14 Jan 2006 22:13 hocr (0.7.2) * command line example implements pipes * Tal. (tal.bav_at_gmail.com): add save ppm to command line example. * move tal's save as pnm to the internal hocr_pixbuf functions. * add command line args to hocr-gtk example * add save picture to hocr-gtk example * add xsane option to hocr-gtk example * clean picture from artefacts before ocr it * Tal. (tal.bav_at_gmail.com): add java binding example imagej-plugin -- Yaacov Zamir Thu, 5 Jan 2006 22:13 hocr (0.7.1) * Fix bindings * add pyGTK example * Diego Iastrubni: fix qt example -- Yaacov Zamir Mon, 2 Jan 2006 22:13 hocr (0.7.0) * add bindings to C++, Python and Perl * documentation is now separate for c and cpp -- Yaacov Zamir Sun, 1 Jan 2006 22:13 hocr (0.6.4) * make memory allocation dinamic in do_ocr -- Yaacov Zamir Wed, 14 Dec 2005 22:13 hocr (0.6.1) * code cleanups * add benchmark tests for: Literature, poetry (with nikud) and bible texts. -- Yaacov Zamir Wed, 14 Dec 2005 22:13 hocr (0.6.0) * can read nikud * add command var to the pixbuf structure -- Yaacov Zamir Tue, 13 Dec 2005 22:13 hocr (0.5.1) * examples now named: hocr, hocr-gtk * fix line equation for short lines * create different file for different objects * use a textbuffer structure -- Yaacov Zamir Sat, 10 Dec 2005 22:13 hocr (0.4.8) * Use columns * Ignure nikud marks * use non horizontal lines * add command to the image buffer struct to let user control ocr. * add none-used error to the image struct to let peogram return feedback to user -- Yaacov Zamir Wed, 07 Dec 2005 22:13 hocr (0.4.7) * Remove cpp (and hocr-qt) bindings, untill API stabilize. -- Yaacov Zamir Wed, 07 Dec 2005 22:13 hocr (0.4.6) * Fix a bug in get/set bit functions * Add desktop menu entry only if hocr-gtk is made * Use gtk toolkit and not gnome to make example more portable * Rename the gui example hocr-gtk -- Yaacov Zamir Mon, 21 Nov 2005 00:13 hocr (0.4.5a) * Ido Kanner reported a buffer overflow on hocr cmd line example, fixed. -- Yaacov Zamir Sun, 04 Sep 2005 22:13 hocr (0.4.5) * Yuval Tanny: idea to make line detection more accurate by adding min/max line_coverage consts and a minimum finding logic between lines. * add a HACKING and BUGS files to set guidelines for patches in the future. * add hocr-qt example and remove qhocr and the bsd things. -- Yaacov Zamir Sun, 21 Aug 2005 02:13 hocr (0.4.4) * add Diego Iastrubni qhocr to the examples directory. see examles/README_examples and examples/COPYING_examples. -- Yaacov Zamir Fri, 19 Aug 2005 02:13 hocr (0.4.3) * add C++ bindings -- Yaacov Zamir Thu, 18 Aug 2005 22:13 hocr (0.4.3) * add hocr man file * add file input function for pbm formated files * add documentation in the hocr.h file. -- Yaacov Zamir Thu, 18 Aug 2005 22:13 hocr (0.4.0) * hocr is a lib now * Yuval Tanny: patch to use get/set pixels functions, making the code much more readable and smaller. * remove gnome, gtk and glib dependencies from ocr code * TODO: create a load image function -- Yaacov Zamir Tue, 16 Aug 2005 22:13 hocr (0.3.2) * make the command line compatible with gocr -i input_file -f format * add html output to command line * add sane support by assuming input is ppm if not explicitly set -- Yaacov Zamir Tue, 16 Aug 2005 22:13 hocr (0.3.1) * Dan Kenigsberg: Fix memory leak when openinig new picture * Dovix: add menu entry and a spec file for rpm creating * add command line interface for Dan Kenigsberg -- Yaacov Zamir Sun, 14 Aug 2005 22:13 hocr (0.3.0) * close crash bug * add zoom in and out -- Yaacov Zamir Sun, 14 Aug 2005 22:13 hocr (0.2.0) * Initial release * Add spell check * Add patch by Yuval Tanny: make gui interface more usable by coloring the unreadble signs and putting picture and text on the same window. -- Yaacov Zamir Sun, 14 Aug 2005 22:13 libhocr-0.10.17/INSTALL0000644000175000017500000001722711017002616011257 00000000000000Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. libhocr-0.10.17/HACKING0000644000175000017500000000324111017002616011204 00000000000000Working in HOCR ------------------- When writing HOCR our priorities are 1) Correctness. 2) Maintainable & Documented. 3) Modular and well designed. When you submit code to me for inclusion in HOCR, or when you modify the sources directly on the SVN repository, please keep those things in mind. - Clarity of design and function are paramount - Please follow the coding style used HOCR. The HOCR coding style. -------------------------- Use space for indentation, braces are unindented and on a seperate line. Use indent utility. (indent -bad -bap -bbb -bli0 -fca -i2 -l80 -nlp -psl -sc -sob -ss -ts2 -nut) Use doxygen style documentation. On top of that, you will have to: - Follow the hocr namespace convention for function names. hocr_submodule_operation - Do not optimize unnecesarly. Do profile, do look for the weak spots before applying "optimization by feeling". - It is more important to keep the code maintainable and readable than to be optimized. If you have a great idea about optimizing the code, make sure it is implemented cleanly, that there is a clean and maintainable way to do it. - Optimized code that is difficult to maintain has no place in HOCR and will be dropped. All of this is to ensure the HOCR code will be kept within reasonable margins of maintainability for the future: Remember, in two years you will probably be far too busy to maintain your own contributions, and they might become a burden to the program maintainers. ----------------------- Cleaning code in HOCR is more important than trying not to break existing code. By all means, code clean ups are always welcome. libhocr-0.10.17/Doxyfile.in0000644000175000017500000014522111017002616012335 00000000000000# Doxyfile 1.5.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = libhocr # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @VERSION@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = docs # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # This tag can be used to specify the encoding used in the generated output. # The encoding is not always determined by the language that is chosen, # but also whether or not the output is meant for Windows or non-Windows users. # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES # forces the Windows encoding (this is the default for the Windows binary), # whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = NO # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = src/ # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = *.h # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = ./ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a caller dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that a graph may be further truncated if the graph's # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = YES libhocr-0.10.17/libhocr.pc.in0000644000175000017500000000040211051620032012560 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libhocr Description: A C library for hebrew optical character recognition Version: @VERSION@ Requires: Libs: -lhocr @ld_hspell@ @ld_tiff@ -lm Cflags: -I@pkgincludedir@ libhocr-0.10.17/README0000644000175000017500000000040711017002616011076 00000000000000About: HOCR is a Hebrew character recognition library http://hocr.berlios.de How can I help ? Get the code via the svn repository try it, fix it and submit patches to the code. Yaacov Zamir Monday, 10 Av 5765, August 15 2005 libhocr-0.10.17/Makefile.am0000644000175000017500000000072011017002616012250 00000000000000## Makefile.am -- Process this file with automake to produce Makefile.in SUBDIRS = src examples bindings docs EXTRA_DIST = \ Doxyfile HACKING pkgconfigdir = $(libdir)/pkgconfig if WITH_GTK pkgconfig_DATA = libhocr.pc libhocr-gtk.pc else pkgconfig_DATA = libhocr.pc endif hocrdocdir = ${prefix}/share/doc/libhocr hocrdoc_DATA = \ README \ AUTHORS \ COPYING \ NEWS \ ChangeLog \ INSTALL \ HACKING libhocr-0.10.17/examples/0000777000175000017500000000000011051630065012122 500000000000000libhocr-0.10.17/examples/hocr/0000777000175000017500000000000011051630065013055 500000000000000libhocr-0.10.17/examples/hocr/hocr.c0000644000175000017500000015207511051626254014107 00000000000000 /*************************************************************************** * hocr.c * * Fri Aug 12 20:13:33 2005 * Copyright 2005-2008 Yaacov Zamir * ****************************************************************************/ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "hocr.h" #ifdef USE_GTK #include #include #include "ho_gtk.h" #endif gchar *image_in_filename = NULL; gchar *text_out_filename = NULL; gchar *data_out_filename = NULL; gchar *image_out_path = NULL; gchar *image_out_type = NULL; gboolean version = FALSE; gboolean debug = FALSE; gboolean verbose = FALSE; gboolean dir_ltr = FALSE; gboolean text_out_html = FALSE; gboolean text_out_font_numbers = FALSE; #ifdef USE_GTK gboolean no_gtk = FALSE; #else gboolean no_gtk = TRUE; #endif gint threshold = 0; gint adaptive_threshold = 0; gint adaptive_threshold_type = 0; gint scale_by = 0; gboolean do_not_auto_scale = FALSE; gdouble rotate_angle = 0.0; gboolean do_not_auto_rotate = FALSE; gboolean do_opening = FALSE; gboolean do_closing = FALSE; gboolean do_dilation = FALSE; gboolean do_erosion = FALSE; gint paragraph_setup = 0; gint slicing_threshold = 0; gint slicing_width = 0; gint line_leeway = 0; gint font_spacing_code = 0; gboolean show_grid = FALSE; gboolean save_copy = FALSE; gboolean save_bw = FALSE; gboolean save_layout = FALSE; gboolean save_fonts = FALSE; gboolean debug_font_filter_list = FALSE; gint debug_font_filter = 0; gboolean only_image_proccesing = FALSE; gboolean only_layout_analysis = FALSE; gboolean only_save_fonts = FALSE; gint spacing_code = 0; gint lang_code = 0; gint font_code = 0; gboolean dont_recognize_nikud = FALSE; gboolean do_linguistics = FALSE; GError *error = NULL; /* black and white text image */ ho_bitmap *m_page_text = NULL; ho_bitmap *m_page_text_temp = NULL; /* text layout */ ho_layout *l_page = NULL; /* progress indicator */ gint progress; static gchar *copyright_message = "hocr %s - Hebrew OCR utility\n\ %s\n\ http://hocr.berlios.de\n\ Copyright (C) 2005-2008 Yaacov Zamir \n\ \n\ This program is free software: you can redistribute it and/or modify\n\ it under the terms of the GNU General Public License as published by\n\ the Free Software Foundation, either version 3 of the License, or\n\ (at your option) any later version.\n\ \n\ This program is distributed in the hope that it will be useful,\n\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ GNU General Public License for more details.\n\ \n\ You should have received a copy of the GNU General Public License\n\ along with this program. If not, see .\n"; static gchar *font_filters_list = "hocr - Hebrew OCR utility\n\ %s\n\ Font filters list\n\ 1. main font.\n\ 2. second part.\n\ 3. holes in font.\n\ 4. horizontal bars in font.\n\ 5. vertical bars in font.\n\ 6. 45 deg. diagonals in font.\n\ 7. 135 deg. diagonals in font.\n\ 8. thined font.\n\ 9. crosses in font.\n\ 10. ends in font.\n\ 11. top font edges.\n\ 12. big top font edges.\n\ 13. bottom font edges.\n\ 14. big bottom font edges.\n\ 15. left font edges.\n\ 16. big left font edges.\n\ 17. right font edges.\n\ 18. big right font edges.\n\ 19. top font notches.\n\ 20. bottom font notches.\n\ 21. left font notches.\n\ 22. right font notches.\n\ 99. all.\n\ "; static gchar *html_page_header = "\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\
\n\ %s\n\
\n\
\n\ %s\n\
\n\
\n\ %s\n\
\n\
\n\
\n\
\n"; static gchar *html_page_footer = "
\n
\n\n\n"; static gchar *html_debug_header = "\n\ \n\ \n\ \n\ \n\ \n\ \n\
\n";

static gchar *html_debug_footer = "
\n\n\n"; static GOptionEntry file_entries[] = { {"images-out-path", 'O', 0, G_OPTION_ARG_FILENAME, &image_out_path, "use PATH for output images", "PATH"}, {"images-out-type", 'G', 0, G_OPTION_ARG_FILENAME, &image_out_type, "output images as TYPE (tiff, jpeg, png)", "TYPE"}, {"data-out", 'u', 0, G_OPTION_ARG_FILENAME, &data_out_filename, "use FILE as output data file name", "FILE"}, {"save-copy", 'C', 0, G_OPTION_ARG_NONE, &save_copy, "save a compy of original image", NULL}, {"save-bw", 'b', 0, G_OPTION_ARG_NONE, &save_bw, "save proccesd bw image", NULL}, {"save-bw-exit", 'B', 0, G_OPTION_ARG_NONE, &only_image_proccesing, "save proccesd bw image and exit", NULL}, {"save-layout", 'l', 0, G_OPTION_ARG_NONE, &save_layout, "save layout image", NULL}, {"save-layout-exit", 'L', 0, G_OPTION_ARG_NONE, &only_layout_analysis, "save layout image and exit", NULL}, {"save-fonts", 'f', 0, G_OPTION_ARG_NONE, &save_fonts, "save fonts", NULL}, {"save-fonts-exit", 'F', 0, G_OPTION_ARG_NONE, &only_save_fonts, "save fonts images and exit", NULL}, {NULL} }; static GOptionEntry image_entries[] = { {"thresholding-type", 'T', 0, G_OPTION_ARG_INT, &adaptive_threshold_type, "thresholding type, 0 normal, 1 none, 2 fine", "NUM"}, {"threshold", 't', 0, G_OPTION_ARG_INT, &threshold, "use NUM as threshold value, 1..100", "NUM"}, {"adaptive-threshold", 'a', 0, G_OPTION_ARG_INT, &adaptive_threshold, "use NUM as adaptive threshold value, 1..100", "NUM"}, {"scale", 's', 0, G_OPTION_ARG_INT, &scale_by, "scale input image by SCALE 1..9, 0 auto", "SCALE"}, {"no-auto-scale", 'S', 0, G_OPTION_ARG_NONE, &do_not_auto_scale, "do not auto acale image", NULL}, {"rotate", 'q', 0.0, G_OPTION_ARG_DOUBLE, &rotate_angle, "rotate image clockwise in deg.", "DEG"}, {"no-auto-rotate", 'Q', 0, G_OPTION_ARG_NONE, &do_not_auto_rotate, "do not auto rotate image", NULL}, {"opening", '1', 0, G_OPTION_ARG_NONE, &do_opening, "try to separate touching fonts", NULL}, {"closing", '2', 0, G_OPTION_ARG_NONE, &do_closing, "try to connect disconnected font parts", NULL}, {"erosion", '3', 0, G_OPTION_ARG_NONE, &do_erosion, "try to delete artefacts", NULL}, {"dilation", '4', 0, G_OPTION_ARG_NONE, &do_dilation, "try to redraw missing font parts", NULL}, {NULL} }; static GOptionEntry segmentation_entries[] = { {"colums setup", 'c', 0, G_OPTION_ARG_INT, ¶graph_setup, "colums setup: 1.. #colums, 0 auto, 255 free", "NUM"}, {"slicing", 'x', 0, G_OPTION_ARG_INT, &slicing_threshold, "use NUM as font slicing threshold, 1..250", "NUM"}, {"slicing-width", 'X', 0, G_OPTION_ARG_INT, &slicing_width, "use NUM as font slicing width, 50..250", "NUM"}, {"slicing-line", 'E', 0, G_OPTION_ARG_INT, &line_leeway, "use NUM line leeway for font slicing, 0..90", "NUM"}, {"font-spacing", 'w', 0, G_OPTION_ARG_INT, &font_spacing_code, "font spacing: tight ..-1, 0, 1.. spaced", "NUM"}, {NULL} }; static GOptionEntry debug_entries[] = { {"draw-grid", 'g', 0, G_OPTION_ARG_NONE, &show_grid, "draw grid on output images", NULL}, {"debug", 'd', 0, G_OPTION_ARG_NONE, &verbose, "print debuging information while running", NULL}, {"debug-extra", 'D', 0, G_OPTION_ARG_NONE, &debug, "print extra debuging information", NULL}, {"font-filter", 'y', 0, G_OPTION_ARG_INT, &debug_font_filter, "debug a font filter, use filter NUM", "NUM"}, {"font-filter-list", 'Y', 0, G_OPTION_ARG_NONE, &debug_font_filter_list, "print a list of debug a font filters", NULL}, {"font-num-out", 'j', 0, G_OPTION_ARG_NONE, &text_out_font_numbers, "print font numbers in output text", NULL}, {NULL} }; static GOptionEntry entries[] = { {"image-in", 'i', 0, G_OPTION_ARG_FILENAME, &image_in_filename, "use FILE as input image file name", "FILE"}, {"text-out", 'o', 0, G_OPTION_ARG_FILENAME, &text_out_filename, "use FILE as output text file name", "FILE"}, {"html-out", 'h', 0, G_OPTION_ARG_NONE, &text_out_html, "output text in html format", NULL}, #ifdef USE_GTK {"no-gtk", 'N', 0, G_OPTION_ARG_NONE, &no_gtk, "do not use gtk for file input and output", NULL}, #endif {"ltr", 'R', 0, G_OPTION_ARG_NONE, &dir_ltr, "left to right text", NULL}, {"font", 'z', 0, G_OPTION_ARG_INT, &font_code, "use font NUM", "NUM"}, {"no-nikud", 'n', 0, G_OPTION_ARG_NONE, &dont_recognize_nikud, "do not recognize nikud", NULL}, {"linguistics", 'A', 0, G_OPTION_ARG_NONE, &do_linguistics, "do linguistics check", NULL}, {"version", 'v', 0, G_OPTION_ARG_NONE, &version, "print version information and exit", NULL}, {NULL} }; /* headers */ int hocr_printerr (const char *msg); int hocr_cmd_parser (int *argc, char **argv[]); int hocr_exit (); ho_pixbuf *hocr_pixbuf_load_with_debug (); ho_bitmap *hocr_image_processing_with_debug (ho_pixbuf * pix); ho_layout *hocr_layout_analysis_with_debug (const ho_bitmap * m_in, const int font_spacing_code, const int paragraph_setup, const unsigned char dir_ltr); int hocr_font_recognition_with_debug (ho_layout * l_page, ho_string * s_text_out, ho_string * s_data_out); /* definitions */ int hocr_printerr (const char *msg) { g_printerr ("%s: %s\n\ Try `--help' for more information.\n", g_get_prgname (), msg); return TRUE; } int hocr_cmd_parser (int *argc, char **argv[]) { GOptionContext *context; GOptionGroup *group; /* get user args */ context = g_option_context_new ("- Hebrew OCR utility"); group = g_option_group_new ("file", "File options", "Show file options", NULL, NULL); g_option_group_add_entries (group, file_entries); g_option_context_add_group (context, group); group = g_option_group_new ("image-proccesing", "Image proccesing options", "Show image proccesing options", NULL, NULL); g_option_group_add_entries (group, image_entries); g_option_context_add_group (context, group); group = g_option_group_new ("segmentation", "Segmentation options", "Show segmentation options", NULL, NULL); g_option_group_add_entries (group, segmentation_entries); g_option_context_add_group (context, group); group = g_option_group_new ("debug", "Debug options", "Show debug options", NULL, NULL); g_option_group_add_entries (group, debug_entries); g_option_context_add_group (context, group); g_option_context_add_main_entries (context, entries, PACKAGE_NAME); g_option_context_parse (context, argc, argv, &error); /* free allocated memory */ g_option_context_free (context); if (error) { hocr_printerr ("unrecognized option"); exit (1); } if (version) { g_printf (copyright_message, VERSION, BUILD); exit (0); } if (debug_font_filter_list) { g_printf (font_filters_list, BUILD); exit (0); } if (!no_gtk && !image_in_filename) { hocr_printerr ("no input image file name (use -N for pipeing)"); exit (1); } if (debug || verbose) g_print ("%s - Hebrew OCR utility\n", PACKAGE_STRING); /* sanity check */ if (adaptive_threshold_type > 2 || adaptive_threshold_type < 0) { hocr_printerr ("unknown thresholding type using normal settings"); adaptive_threshold_type = 0; } if (scale_by > 9 || scale_by < 0) { hocr_printerr ("unknown scaling factor using auto settings"); scale_by = 0; } if (paragraph_setup > 255 || paragraph_setup < 0) { hocr_printerr ("unknown paragraph setup using auto settings"); paragraph_setup = 0; } if (threshold > 100 || threshold < 0) { hocr_printerr ("unknown thresholding value using auto settings"); threshold = 0; } if (adaptive_threshold > 100 || adaptive_threshold < 0) { hocr_printerr ("unknown thresholding value using auto settings"); adaptive_threshold = 0; } if (font_spacing_code > 3 || font_spacing_code < -3) { hocr_printerr ("unknown font_spacing value using auto settings"); font_spacing_code = 0; } if (only_save_fonts) { save_fonts = TRUE; } return FALSE; } ho_pixbuf * hocr_pixbuf_load_with_debug () { ho_pixbuf *pix = NULL; gchar *filename; /* read image from file */ if (no_gtk) { pix = ho_pixbuf_pnm_load (image_in_filename); #ifdef USE_TIFF /* if this is not a pnm image file, try b/w tiff */ if (!pix) pix = ho_pixbuf_bw_tiff_load (image_in_filename); #endif /* USE_TIFF */ } #ifdef USE_GTK else pix = ho_gtk_pixbuf_load (image_in_filename); #endif /* USE_GTK */ if (!pix) { hocr_printerr ("can't read input image\n"); exit (1); } if (debug || verbose) g_print (" input image is %d by %d pixels, with %d color channels\n", pix->width, pix->height, pix->n_channels); /* if copy image */ if (save_copy) { /* create file name */ if (no_gtk) filename = g_strdup_printf ("%s-image-copy.pgm", image_out_path); else { if (image_out_type) { if (image_out_type[0] == 't') /* tiff */ filename = g_strdup_printf ("%s-image-copy.tif", image_out_path); if (image_out_type[0] == 'j') /* jpg */ filename = g_strdup_printf ("%s-image-copy.jpg", image_out_path); if (image_out_type[0] == 'p') /* png */ filename = g_strdup_printf ("%s-image-copy.png", image_out_path); } else filename = g_strdup_printf ("%s-image-copy.jpg", image_out_path); } /* save to file system */ if (filename) { if (no_gtk) ho_pixbuf_pnm_save (pix, filename); #ifdef USE_GTK else { if (image_out_type) { if (image_out_type[0] == 't') /* tiff */ ho_gtk_pixbuf_save (pix, filename, "tiff"); if (image_out_type[0] == 'j') /* jpg */ ho_gtk_pixbuf_save (pix, filename, "jpeg"); if (image_out_type[0] == 'p') /* png */ ho_gtk_pixbuf_save (pix, filename, "png"); } else ho_gtk_pixbuf_save (pix, filename, "png"); } #endif /* USE_GTK */ g_free (filename); } } return pix; } /* FIXME: this function use globals */ ho_bitmap * hocr_image_processing_with_debug (ho_pixbuf * pix) { ho_bitmap *m_bw = NULL; ho_bitmap *m_bw_temp = NULL; unsigned char size = 0; m_bw = ho_pixbuf_to_bitmap_wrapper (pix, scale_by, adaptive_threshold_type, threshold, adaptive_threshold, size); if (!m_bw) { hocr_printerr ("can't convert to black and white\n"); exit (1); } /* prompt user scale */ if (debug && scale_by) if (scale_by == 1) g_print (" user no scaling.\n", scale_by); else g_print (" user scale by %d.\n", scale_by); /* do we need to auto scale ? */ if (!scale_by) { /* get fonts size for autoscale */ if (ho_dimentions_font_width_height_nikud (m_bw, 6, 200, 6, 200)) { hocr_printerr ("can't create object map\n"); exit (1); } /* if fonts are too small and user wants auto scale, re-scale image */ if (m_bw->font_height < 15) scale_by = 3; else if (m_bw->font_height < 30) scale_by = 2; else scale_by = 1; if (debug) if (scale_by > 1) g_print (" auto scale by %d.\n", scale_by); else g_print (" no auto scale neaded.\n"); if (scale_by > 1) { /* re-create bitmap */ ho_bitmap_free (m_bw); m_bw = ho_pixbuf_to_bitmap_wrapper (pix, scale_by, adaptive_threshold_type, threshold, adaptive_threshold, size); if (!m_bw) { hocr_printerr ("can't convert to black and white after auto scaleing \n"); exit (1); } } } /* remove very small and very large things */ m_bw_temp = ho_bitmap_filter_by_size (m_bw, 3, 3 * m_bw->height / 4, 3, 3 * m_bw->width / 4); if (m_bw_temp) { ho_bitmap_free (m_bw); m_bw = m_bw_temp; m_bw_temp = NULL; } /* rotate image */ if (rotate_angle) { m_bw_temp = ho_bitmap_rotate (m_bw, rotate_angle); ho_bitmap_free (m_bw); if (!m_bw_temp) { hocr_printerr ("can't rotate image \n"); exit (1); } m_bw = m_bw_temp; } /* if no rotate angle given by user auto rotate image */ else if (!do_not_auto_rotate) { double angle; /* get fonts size for auto angle */ if (ho_dimentions_font_width_height_nikud (m_bw, 6, 200, 6, 200)) { hocr_printerr ("can't create object map\n"); exit (1); } angle = ho_dimentions_get_lines_angle (m_bw); if (debug || verbose) g_print (" auto rotate: angle %f.\n", angle); if (angle) { m_bw_temp = ho_bitmap_rotate (m_bw, angle); ho_bitmap_free (m_bw); if (!m_bw_temp) { hocr_printerr ("can't auto rotate image \n"); exit (1); } m_bw = m_bw_temp; } } return m_bw; } ho_layout * hocr_layout_analysis_with_debug (const ho_bitmap * m_in, const int font_spacing_code, const int paragraph_setup, const unsigned char dir_ltr) { int block_index; int line_index; int word_index; ho_layout *layout_out = NULL; layout_out = ho_layout_new (m_in, font_spacing_code, paragraph_setup, dir_ltr); if (!layout_out) return NULL; ho_layout_create_block_mask (layout_out); if (debug || verbose) g_print (" found %d blocks.\n", layout_out->n_blocks); /* look for lines inside blocks */ for (block_index = 0; block_index < layout_out->n_blocks; block_index++) { if (debug || verbose) g_print (" analyzing block %d.\n", block_index + 1); ho_layout_create_line_mask (layout_out, block_index); if (debug || verbose) g_print (" found %d lines.\n", layout_out->n_lines[block_index]); if (debug) g_print (" font height %d width %d, line spacing %d\n", layout_out->m_blocks_text[block_index]->font_height, layout_out->m_blocks_text[block_index]->font_width, layout_out->m_blocks_text[block_index]->line_spacing); /* look for words inside line */ for (line_index = 0; line_index < layout_out->n_lines[block_index]; line_index++) { if (debug || verbose) g_print (" analyzing line %d.\n", line_index + 1); ho_layout_create_word_mask (layout_out, block_index, line_index); if (debug) g_print (" line avg fill %d common fill %d\n", layout_out->m_lines_text[block_index][line_index]->avg_line_fill, layout_out->m_lines_text[block_index][line_index]->com_line_fill); if (debug) g_print (" found %d words. font spacing %d\n", layout_out->n_words[block_index][line_index], layout_out->m_lines_text[block_index][line_index]->font_spacing); /* look for fonts inside word */ for (word_index = 0; word_index < layout_out->n_words[block_index][line_index]; word_index++) { if (debug) g_print (" analyzing word %d.\n", word_index + 1); ho_layout_create_font_mask (layout_out, block_index, line_index, word_index, slicing_threshold, slicing_width, line_leeway); if (debug) g_print (" found %d fonts.\n", layout_out->n_fonts[block_index][line_index][word_index]); } } } return layout_out; } /* FIXME: this functions use globals */ int hocr_font_recognition_with_debug (ho_layout * l_page, ho_string * s_text_out, ho_string * s_data_out) { int i; int font_number = 0; int number_of_fonts = l_page->number_of_fonts; int block_index; int line_index; int word_index; int font_index; ho_pixbuf *pix_out = NULL; ho_bitmap *m_text = NULL; ho_bitmap *m_mask = NULL; ho_bitmap *m_font_main_sign = NULL; ho_bitmap *m_font_nikud = NULL; ho_bitmap *m_font_filter = NULL; ho_bitmap *m_font_test = NULL; ho_bitmap *m_edge = NULL; ho_objmap *o_fonts = NULL; gchar *text_out = NULL; gchar *filename = NULL; gsize length; gsize terminator_pos; GError *error = NULL; for (block_index = 0; block_index < l_page->n_blocks; block_index++) { /* start of paragraph */ if (text_out_html && s_text_out) { text_out = g_strdup_printf ("
\n", block_index + 1, l_page->m_blocks_text[block_index]->x, l_page->m_blocks_text[block_index]->y, l_page->m_blocks_text[block_index]->x + l_page->m_blocks_text[block_index]->width, l_page->m_blocks_text[block_index]->y + l_page->m_blocks_text[block_index]->height); ho_string_cat (s_text_out, text_out); g_free (text_out); } for (line_index = 0; line_index < l_page->n_lines[block_index]; line_index++) { /* start of line */ /* if user asked, print current font number at begining of line */ if (text_out_font_numbers) { text_out = g_strdup_printf ("(%04d) ", font_number + 1); ho_string_cat (s_text_out, text_out); g_free (text_out); } /* loop on all the words in this line */ for (word_index = 0; word_index < l_page->n_words[block_index][line_index]; word_index++) { int word_length = l_page->n_fonts[block_index][line_index][word_index]; unsigned char word_end = FALSE; unsigned char word_start = TRUE; int last_char_i = 0; int char_i = 0; /* start of word */ for (font_index = 0; font_index < word_length; font_index++) { word_end = (font_index == (word_length - 1)); word_start = (font_index == 0); /* count recognized fonts */ font_number++; /* print debug information about fonts */ if (verbose || debug) g_print (" recognizing font %d (%d).\n", font_number, number_of_fonts); if (debug) g_print (" in - block:%d line:%d word:%d font:%d.\n", block_index + 1, line_index + 1, word_index + 1, font_index + 1); /* get font images */ /* get the font */ m_text = ho_layout_get_font_text (l_page, block_index, line_index, word_index, font_index); if (!m_text) { hocr_printerr ("can't get font text"); hocr_exit (); } /* get font line mask */ m_mask = ho_layout_get_font_line_mask (l_page, block_index, line_index, word_index, font_index); if (!m_mask) { hocr_printerr ("can't get font line make"); hocr_exit (); } /* get font main sign */ m_font_main_sign = ho_font_main_sign (m_text, m_mask); if (!m_font_main_sign) { hocr_printerr ("can't get font main sign"); hocr_exit (); } /* get font nikud */ m_font_nikud = ho_bitmap_clone (m_text); if (!m_font_nikud) { hocr_printerr ("can't get font nikud"); hocr_exit (); } ho_bitmap_andnot (m_font_nikud, m_font_main_sign); /* recognize font from images */ { const char *font; const char *nikud; double array_in[HO_ARRAY_IN_SIZE]; double array_out[HO_ARRAY_OUT_SIZE]; double array_nikud_in[HO_NIKUD_ARRAY_IN_SIZE]; double array_nikud_out[HO_NIKUD_ARRAY_OUT_SIZE]; /* get font */ /* insert font to text out */ ho_recognize_create_array_in (m_font_main_sign, m_mask, array_in); ho_recognize_create_array_out (array_in, array_out, font_code); last_char_i = char_i; /* linguistics */ if (do_linguistics) { ho_linguistics_adjust_array_out (array_out, word_end, word_start, last_char_i); } font = ho_recognize_array_out_to_font (array_out, &char_i); /* insert font to text out */ ho_string_cat (s_text_out, font); /* get nikud */ ho_recognize_nikud_array_in (m_font_nikud, m_mask, array_nikud_in); ho_recognize_nikud_array_out (array_nikud_in, array_nikud_out, font_code); nikud = ho_recognize_array_out_to_nikud (array_nikud_out); /* insert nikud to text out if user ask */ if (!dont_recognize_nikud) { /* shin */ if (array_nikud_out[14] == -1.0) ho_string_cat (s_text_out, ho_nikud_array[14]); if (array_nikud_out[15] == -1.0) ho_string_cat (s_text_out, ho_nikud_array[15]); /* dagesh */ if (array_nikud_out[13] == -1.0) ho_string_cat (s_text_out, ho_nikud_array[13]); /* insert nikud to text out */ ho_string_cat (s_text_out, nikud); } /* print debug information */ /* if debug printout font data stream */ if (debug) { int i; for (i = 0; i < HO_ARRAY_IN_SIZE; i++) { if (!(i % 50)) g_print ("\n"); if (!(i % 10)) g_print ("\n"); else if (!(i % 5)) g_print (" "); g_print ("%03.2f, ", array_in[i]); } g_print ("\n"); g_print ("font guess is %s%s\n\n", font, nikud); } /* if user want to dump data to file */ if (data_out_filename) { int i; /* print out the number of the font */ text_out = g_strdup_printf ("\nfont %d:\n ", font_number); ho_string_cat (s_data_out, text_out); g_free (text_out); /* print font images in html code */ if (save_fonts && s_data_out) { text_out = g_strdup_printf ("\nfont image: \"font\n", image_out_path, font_number); ho_string_cat (s_data_out, text_out); g_free (text_out); } /* print font filter images in html code */ if (debug_font_filter && s_data_out) { if (debug_font_filter < 99) { text_out = g_strdup_printf ("font filter %d: \"filter\"", debug_font_filter, image_out_path, font_number, debug_font_filter); ho_string_cat (s_data_out, text_out); g_free (text_out); text_out = g_strdup_printf ("\"filter", image_out_path, font_number, debug_font_filter); ho_string_cat (s_data_out, text_out); g_free (text_out); } else { int filter_number; for (filter_number = 2; filter_number < 23; filter_number++) { text_out = g_strdup_printf (" %d: \"", filter_number, image_out_path, font_number, filter_number); ho_string_cat (s_data_out, text_out); g_free (text_out); text_out = g_strdup_printf ("\"", image_out_path, font_number, filter_number); ho_string_cat (s_data_out, text_out); if (filter_number == 10 || filter_number == 18) ho_string_cat (s_data_out, "\n"); g_free (text_out); } } } /* add new line after images */ if (debug_font_filter && s_data_out) { ho_string_cat (s_data_out, "\n"); } /* print font array in */ for (i = 0; i < HO_ARRAY_IN_SIZE; i++) { if (!(i % 50)) ho_string_cat (s_data_out, "\n"); if (!(i % 10)) { text_out = g_strdup_printf ("\ni(%02d) ", i); ho_string_cat (s_data_out, text_out); g_free (text_out); } else if (!(i % 5)) ho_string_cat (s_data_out, " "); text_out = g_strdup_printf ("%03.2f, ", array_in[i]); ho_string_cat (s_data_out, text_out); g_free (text_out); } /* print nikud array in */ if (!dont_recognize_nikud) { for (i = 0; i < HO_NIKUD_ARRAY_IN_SIZE; i++) { if (!(i % 50)) ho_string_cat (s_data_out, "\n"); if (!(i % 10)) { text_out = g_strdup_printf ("\ni(%02d) ", i); ho_string_cat (s_data_out, text_out); g_free (text_out); } else if (!(i % 5)) ho_string_cat (s_data_out, " "); text_out = g_strdup_printf ("%03.2f, ", array_nikud_in[i]); ho_string_cat (s_data_out, text_out); g_free (text_out); } } /* printout the font guess array */ ho_string_cat (s_data_out, "\n\noutput:"); for (i = 0; i < HO_ARRAY_OUT_SIZE; i++) { if (!(i % 8)) { text_out = g_strdup_printf ("\no(%02d) ", i); ho_string_cat (s_data_out, text_out); g_free (text_out); } text_out = g_strdup_printf ("%s:%03.2f, ", ho_sign_array[i], array_out[i]); ho_string_cat (s_data_out, text_out); g_free (text_out); } for (i = 0; i < HO_NIKUD_ARRAY_OUT_SIZE; i++) { if (!(i % 8)) { text_out = g_strdup_printf ("\no(%02d) ", i); ho_string_cat (s_data_out, text_out); g_free (text_out); } text_out = g_strdup_printf ("%s:%03.2f, ", ho_nikud_array[i], array_nikud_out[i]); ho_string_cat (s_data_out, text_out); g_free (text_out); } /* insert font guess to debug file */ { text_out = g_strdup_printf ("\n\nfont guess is %s%s\n\n", font, nikud); ho_string_cat (s_data_out, text_out); g_free (text_out); } } } /* end of recognize font from images */ /* save font image to dist */ if (save_fonts) { if (no_gtk) filename = g_strdup_printf ("%s-font-%d.pgm", image_out_path, font_number); else filename = g_strdup_printf ("%s-font-%d.png", image_out_path, font_number); m_font_main_sign->x = 0; m_font_main_sign->y = 0; m_font_nikud->x = 0; m_font_nikud->y = 0; m_mask->x = 0; m_mask->y = 0; if (no_gtk) ho_font_pnm_save (m_font_main_sign, m_font_nikud, m_mask, filename); #ifdef USE_GTK else ho_gtk_font_save (m_font_main_sign, m_font_nikud, m_mask, filename, "png"); #endif /* USE_GTK */ /* free filename */ g_free (filename); } /* save font filter images to disk */ if (debug_font_filter) { if (debug_font_filter < 99) { /* font filter */ { /* create an image of filter */ m_font_test = ho_font_filter (m_font_main_sign, m_mask, debug_font_filter); if (m_font_test) { /* dilate points 9 (ends) 10 (crosses) */ if (debug_font_filter == 9 || debug_font_filter == 10) { ho_bitmap *m_temp = NULL; m_temp = ho_bitmap_dilation (m_font_test); ho_bitmap_free (m_font_test); m_font_test = m_temp; } /* save the filter to file */ if (no_gtk) filename = g_strdup_printf ("%s-font-%d-%d.pgm", image_out_path, font_number, debug_font_filter); else filename = g_strdup_printf ("%s-font-%d-%d.png", image_out_path, font_number, debug_font_filter); m_font_main_sign->x = 0; m_font_main_sign->y = 0; m_font_test->x = 0; m_font_test->y = 0; m_mask->x = 0; m_mask->y = 0; if (no_gtk) ho_font_pnm_save (m_font_main_sign, m_font_test, m_mask, filename); #ifdef USE_GTK else ho_gtk_font_save (m_font_main_sign, m_font_test, m_mask, filename, "png"); #endif /* USE_GTK */ /* free file name */ g_free (filename); /* free filter bitmap */ ho_bitmap_free (m_font_test); m_font_test = NULL; } } /* hole filter */ { /* create an image of hole filter */ m_font_test = ho_font_holes_filter (m_font_main_sign, m_mask, debug_font_filter); if (m_font_test) { /* dilate points 9 (ends) 10 (crosses) */ if (debug_font_filter == 9 || debug_font_filter == 10) { ho_bitmap *m_temp = NULL; m_temp = ho_bitmap_dilation (m_font_test); ho_bitmap_free (m_font_test); m_font_test = m_temp; } /* save the filter to file */ if (no_gtk) filename = g_strdup_printf ("%s-font-%d-%d-h.pgm", image_out_path, font_number, debug_font_filter); else filename = g_strdup_printf ("%s-font-%d-%d-h.png", image_out_path, font_number, debug_font_filter); m_font_main_sign->x = 0; m_font_main_sign->y = 0; m_font_test->x = 0; m_font_test->y = 0; m_mask->x = 0; m_mask->y = 0; if (no_gtk) ho_font_pnm_save (m_font_main_sign, m_font_test, m_mask, filename); #ifdef USE_GTK else ho_gtk_font_save (m_font_main_sign, m_font_test, m_mask, filename, "png"); #endif /* USE_GTK */ /* free file name */ g_free (filename); /* free filter bitmap */ ho_bitmap_free (m_font_test); m_font_test = NULL; } } } else { int filter_number; for (filter_number = 2; filter_number < 23; filter_number++) { { /* create an image of filter */ m_font_test = ho_font_filter (m_font_main_sign, m_mask, filter_number); if (m_font_test) { /* dilate points 9 (ends) 10 (crosses) */ if (filter_number == 9 || filter_number == 10) { ho_bitmap *m_temp = NULL; m_temp = ho_bitmap_dilation (m_font_test); ho_bitmap_free (m_font_test); m_font_test = m_temp; } /* save the filter to file */ if (no_gtk) filename = g_strdup_printf ("%s-font-%d-%d.pgm", image_out_path, font_number, filter_number); else filename = g_strdup_printf ("%s-font-%d-%d.png", image_out_path, font_number, filter_number); m_font_main_sign->x = 0; m_font_main_sign->y = 0; m_font_test->x = 0; m_font_test->y = 0; m_mask->x = 0; m_mask->y = 0; if (no_gtk) ho_font_pnm_save (m_font_main_sign, m_font_test, m_mask, filename); #ifdef USE_GTK else ho_gtk_font_save (m_font_main_sign, m_font_test, m_mask, filename, "png"); #endif /* USE_GTK */ /* free file name */ g_free (filename); /* free filter bitmap */ ho_bitmap_free (m_font_test); m_font_test = NULL; } } /* hole filter */ { /* create an image of hole filter */ m_font_test = ho_font_holes_filter (m_font_main_sign, m_mask, filter_number); if (m_font_test) { /* dilate points 9 (ends) 10 (crosses) */ if (filter_number == 9 || filter_number == 10) { ho_bitmap *m_temp = NULL; m_temp = ho_bitmap_dilation (m_font_test); ho_bitmap_free (m_font_test); m_font_test = m_temp; } /* save the filter to file */ if (no_gtk) filename = g_strdup_printf ("%s-font-%d-%d-h.pgm", image_out_path, font_number, filter_number); else filename = g_strdup_printf ("%s-font-%d-%d-h.png", image_out_path, font_number, filter_number); m_font_main_sign->x = 0; m_font_main_sign->y = 0; m_font_test->x = 0; m_font_test->y = 0; m_mask->x = 0; m_mask->y = 0; if (no_gtk) ho_font_pnm_save (m_font_main_sign, m_font_test, m_mask, filename); #ifdef USE_GTK else ho_gtk_font_save (m_font_main_sign, m_font_test, m_mask, filename, "png"); #endif /* USE_GTK */ /* free file name */ g_free (filename); /* free filter bitmap */ ho_bitmap_free (m_font_test); m_font_test = NULL; } } } } } /* free bitmaps and others */ ho_bitmap_free (m_font_nikud); ho_bitmap_free (m_font_filter); ho_bitmap_free (m_font_main_sign); ho_bitmap_free (m_text); ho_bitmap_free (m_mask); /* this are empty pointers */ m_text = m_mask = m_font_nikud = m_font_filter = m_font_main_sign = NULL; /* oh ... */ } /* end of fonts loop */ /* add a space after a word to text out */ ho_string_cat (s_text_out, " "); } /* end of words loop */ /* end of line */ if (text_out_html && s_text_out) { ho_string_cat (s_text_out, "
"); } /* add a line-end after a line to text out */ ho_string_cat (s_text_out, "\n"); } /* end of paragraph */ if (text_out_html && s_text_out) { ho_string_cat (s_text_out, "
"); } /* add a line-end after a block end */ ho_string_cat (s_text_out, "\n"); if (text_out_html && s_text_out) { text_out = g_strdup_printf ("
\n"); ho_string_cat (s_text_out, text_out); g_free (text_out); } } return FALSE; } /* FIXME: this functions use globals */ int hocr_exit () { int block_index; int line_index; /* allert user */ if (debug) g_print ("free memory.\n"); /* free image matrixes */ ho_bitmap_free (m_page_text); /* free page layout masks */ ho_layout_free (l_page); /* free file names */ if (image_in_filename) g_free (image_in_filename); if (image_out_path) g_free (image_out_path); if (image_out_type) g_free (image_out_type); if (text_out_filename) g_free (text_out_filename); if (data_out_filename) g_free (data_out_filename); /* exit program */ exit (0); return FALSE; } int main (int argc, char *argv[]) { int number_of_fonts; ho_string *s_text_out = NULL; ho_string *s_data_out = NULL; gchar *text_out = NULL; ho_pixbuf *pix = NULL; /* start of argument analyzing section */ hocr_cmd_parser (&argc, &argv); /* init gtk */ #ifdef USE_GTK if (!no_gtk) gtk_init (&argc, &argv); #endif /* end of argument analyzing section */ /* start of image proccesing section */ if (debug || verbose) g_print ("start image proccesing.\n"); /* load the image from input filename */ pix = hocr_pixbuf_load_with_debug (); /* if user do not nead fidback just do image proccesing */ if (!debug && !verbose) { m_page_text = hocr_image_processing (pix, scale_by, do_not_auto_scale, rotate_angle, do_not_auto_rotate, adaptive_threshold_type, threshold, adaptive_threshold, &progress); } else /* do image proccesing with fidback */ { m_page_text = hocr_image_processing_with_debug (pix); } /* do extra image proccesing */ if (do_opening) { m_page_text_temp = ho_bitmap_opening (m_page_text); ho_bitmap_free (m_page_text); if (!m_page_text_temp) { hocr_printerr ("can't do opening on image \n"); exit (1); } m_page_text = m_page_text_temp; } if (do_closing) { m_page_text_temp = ho_bitmap_closing (m_page_text); ho_bitmap_free (m_page_text); if (!m_page_text_temp) { hocr_printerr ("can't do closing on image \n"); exit (1); } m_page_text = m_page_text_temp; } if (do_dilation) { m_page_text_temp = ho_bitmap_dilation (m_page_text); ho_bitmap_free (m_page_text); if (!m_page_text_temp) { hocr_printerr ("can't do dilation on image \n"); exit (1); } m_page_text = m_page_text_temp; } if (do_erosion) { m_page_text_temp = ho_bitmap_erosion (m_page_text); ho_bitmap_free (m_page_text); if (!m_page_text_temp) { hocr_printerr ("can't do erosion on image \n"); exit (1); } m_page_text = m_page_text_temp; } /* free input pixbuf */ ho_pixbuf_free (pix); if (!m_page_text) { hocr_printerr ("can't do image processing"); exit (1); } if (debug || verbose) if (scale_by > 1) g_print (" procced image is %d by %d pixels (origianl scaled by %d), one color bit.\n", m_page_text->width, m_page_text->height, scale_by); else g_print (" procced image is %d by %d pixels, one color bit.\n", m_page_text->width, m_page_text->height); /* if only image proccesing or save b/w image */ if (save_bw || only_image_proccesing) { gchar *filename; ho_pixbuf *pix_out; pix_out = ho_pixbuf_new_from_bitmap (m_page_text); if (show_grid) ho_pixbuf_draw_grid (pix_out, 120, 30, 0, 0, 0); /* create file name */ if (no_gtk) filename = g_strdup_printf ("%s-image-bw.pgm", image_out_path); else { if (image_out_type) { if (image_out_type[0] == 't') /* tiff */ filename = g_strdup_printf ("%s-image-bw.tif", image_out_path); if (image_out_type[0] == 'j') /* jpg */ filename = g_strdup_printf ("%s-image-bw.jpg", image_out_path); if (image_out_type[0] == 'p') /* png */ filename = g_strdup_printf ("%s-image-bw.png", image_out_path); } else filename = g_strdup_printf ("%s-image-bw.png", image_out_path); } /* save to file system */ if (filename) { if (no_gtk) ho_pixbuf_pnm_save (pix_out, filename); #ifdef USE_GTK else { if (image_out_type) { if (image_out_type[0] == 't') /* tiff */ ho_gtk_pixbuf_save (pix_out, filename, "tiff"); if (image_out_type[0] == 'j') /* jpg */ ho_gtk_pixbuf_save (pix_out, filename, "jpeg"); if (image_out_type[0] == 'p') /* png */ ho_gtk_pixbuf_save (pix_out, filename, "png"); } else ho_gtk_pixbuf_save (pix_out, filename, "png"); } #endif /* USE_GTK */ /* free locale memory */ ho_pixbuf_free (pix_out); g_free (filename); } } if (debug || verbose) g_print ("end image proccesing.\n"); /* if user want save the b/w picture image proccesing produced */ if (only_image_proccesing) hocr_exit (); /* end of image proccesing section */ /* remember: by now you have allocated and not freed: m_page_text */ /* start of layout analyzing section */ if (debug || verbose) g_print ("start image layout analysis.\n"); if (!paragraph_setup) { int cols; cols = ho_dimentions_get_columns (m_page_text); if (cols > 0) { paragraph_setup = cols; if (debug) g_print (" guessing %d columns.\n", cols); } else if (debug) g_print (" guessing one column.\n"); } if (!debug && !verbose) { l_page = hocr_layout_analysis (m_page_text, font_spacing_code, paragraph_setup, slicing_threshold, slicing_width, line_leeway, dir_ltr, &progress); } else { l_page = hocr_layout_analysis_with_debug (m_page_text, font_spacing_code, paragraph_setup, dir_ltr); } if (!l_page) { ho_bitmap_free (m_page_text); hocr_printerr ("can't do layout analysis"); exit (1); } number_of_fonts = l_page->number_of_fonts; /* if only layout analysis or save layout image */ if (save_layout || only_layout_analysis) { gchar *filename = NULL; ho_pixbuf *pix_out = NULL; /* allocate */ /* * pix_out = ho_pixbuf_new_from_layout (layout, show_grid, text_bitmap, * block_frame_red, block_frame_green, block_frame_blue, block_frame_alfa, * block_frame_width, line_frame_red, line_frame_green, line_frame_blue, * line_frame_alfa, line_frame_width, word_frame_red, word_frame_green, * word_frame_blue, word_frame_alfa, word_frame_width, font_frame_red, * font_frame_green, font_frame_blue, font_frame_alfa, font_frame_width); */ pix_out = ho_pixbuf_new_from_layout (l_page, show_grid, m_page_text, 0, 0, 255, 150, 5, 255, 0, 0, 255, 5, 255, 240, 0, 180, 255, 0, 250, 0, 235, 255); /* create file name */ if (no_gtk) filename = g_strdup_printf ("%s-image-layout.pgm", image_out_path); else { if (image_out_type) { if (image_out_type[0] == 't') /* tiff */ filename = g_strdup_printf ("%s-image-layout.tif", image_out_path); if (image_out_type[0] == 'j') /* jpg */ filename = g_strdup_printf ("%s-image-layout.jpg", image_out_path); if (image_out_type[0] == 'p') /* png */ filename = g_strdup_printf ("%s-image-layout.png", image_out_path); } else filename = g_strdup_printf ("%s-image-layout.png", image_out_path); } /* save to file system */ if (filename) { if (no_gtk) ho_pixbuf_pnm_save (pix_out, filename); #ifdef USE_GTK else { if (image_out_type) { if (image_out_type[0] == 't') /* tiff */ ho_gtk_pixbuf_save (pix_out, filename, "tiff"); if (image_out_type[0] == 'j') /* jpg */ ho_gtk_pixbuf_save (pix_out, filename, "jpeg"); if (image_out_type[0] == 'p') /* png */ ho_gtk_pixbuf_save (pix_out, filename, "png"); } else ho_gtk_pixbuf_save (pix_out, filename, "png"); } #endif /* USE_GTK */ ho_pixbuf_free (pix_out); g_free (filename); } } if (debug || verbose) g_print ("end of image layout analysis.\n"); /* if user only want layout image exit now */ if (only_layout_analysis) hocr_exit (); /* start of word recognition section */ if (debug || verbose) { g_print ("start word recognition section.\n"); g_print (" found %d fonts in page.\n", number_of_fonts); } /* start the text out */ s_text_out = ho_string_new (); if (!s_text_out) { hocr_printerr ("can't allocate text memory"); hocr_exit (); } /* start of page */ /* if html print html header */ if (text_out_html) { text_out = g_strdup_printf (html_page_header, "", "", ""); ho_string_cat (s_text_out, text_out); g_free (text_out); } /* start the data out */ if (data_out_filename) { s_data_out = ho_string_new (); if (!s_data_out) { hocr_printerr ("can't allocate data memory"); hocr_exit (); } /* init the first line of data file */ text_out = g_strdup_printf (html_debug_header); ho_string_cat (s_data_out, text_out); g_free (text_out); } /* do character recognition */ if (debug || verbose || text_out_font_numbers || data_out_filename || debug_font_filter || save_fonts) { hocr_font_recognition_with_debug (l_page, s_text_out, s_data_out); } else { hocr_font_recognition (l_page, s_text_out, text_out_html, font_code, !dont_recognize_nikud, do_linguistics, &progress); } /* end of page */ if (text_out_html && s_text_out) { text_out = g_strdup_printf (html_page_footer); ho_string_cat (s_text_out, text_out); g_free (text_out); } /* close data file html fromat */ if (s_data_out) { text_out = g_strdup_printf (html_debug_footer); ho_string_cat (s_data_out, text_out); g_free (text_out); } if (debug || verbose) g_print ("end word recognition section.\n"); /* end of word recognition section */ /* start user output section */ if (debug || verbose) g_print ("start output section.\n"); /* convert text from ho_string to (gchar *) */ text_out = g_strdup_printf ("%s", s_text_out->string); ho_string_free (s_text_out); /* save text */ if (text_out_filename && text_out) { /* if filename is '-' print to stdout */ if (text_out_filename[0] == '-' && text_out_filename[1] == '\0') g_printf (text_out); else g_file_set_contents (text_out_filename, text_out, -1, &error); if (error) { hocr_printerr ("can't write text to file"); } } g_free (text_out); text_out = NULL; /* convert data from ho_string to (gchar *) */ if (s_data_out) { text_out = g_strdup_printf ("%s", s_data_out->string); ho_string_free (s_data_out); } /* save data */ if (data_out_filename && text_out) { g_file_set_contents (data_out_filename, text_out, -1, &error); if (error) { hocr_printerr ("can't write data to file"); } } if (text_out) g_free (text_out); if (debug || verbose) g_print ("end output section.\n"); /* end of user putput section */ /* start of memory cleanup section */ hocr_exit (); return FALSE; } libhocr-0.10.17/examples/hocr/Makefile.am0000644000175000017500000000106711017002616015026 00000000000000EXTRA_DIST = hocr.c if WITH_HOCR INCLUDES=-I$(top_srcdir)/src DEPS= $(top_builddir)/src/libhocr.la ldadd= $(top_builddir)/src/libhocr.la -lm bin_PROGRAMS= hocr hocr_SOURCES = hocr.c hocr_CFLAGS = \ $(glib_CFLAGS) \ $(gtk_CFLAGS) \ $(hspell_CFLAGS) \ $(tiff_CFLAGS) \ $(fftw_CFLAGS) \ -DBUILD=\"$(BUILD_STR)\" hocr_LDADD= \ $(glib_LIBS) \ $(gtk_LIBS) \ $(hspell_LIBS) \ $(tiff_LIBS) \ $(fftw_LIBS) \ $(libhocr_la_LIBADD) \ $(top_builddir)/src/*.o -lm endif libhocr-0.10.17/examples/hocr/Makefile.in0000644000175000017500000004214311043604650015044 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @WITH_HOCR_TRUE@bin_PROGRAMS = hocr$(EXEEXT) subdir = examples/hocr DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__hocr_SOURCES_DIST = hocr.c @WITH_HOCR_TRUE@am_hocr_OBJECTS = hocr-hocr.$(OBJEXT) hocr_OBJECTS = $(am_hocr_OBJECTS) am__DEPENDENCIES_1 = @WITH_HOCR_TRUE@hocr_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @WITH_HOCR_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @WITH_HOCR_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @WITH_HOCR_TRUE@ $(top_builddir)/src/*.o hocr_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(hocr_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(hocr_SOURCES) DIST_SOURCES = $(am__hocr_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = hocr.c @WITH_HOCR_TRUE@INCLUDES = -I$(top_srcdir)/src @WITH_HOCR_TRUE@DEPS = $(top_builddir)/src/libhocr.la @WITH_HOCR_TRUE@ldadd = $(top_builddir)/src/libhocr.la -lm @WITH_HOCR_TRUE@hocr_SOURCES = hocr.c @WITH_HOCR_TRUE@hocr_CFLAGS = \ @WITH_HOCR_TRUE@ $(glib_CFLAGS) \ @WITH_HOCR_TRUE@ $(gtk_CFLAGS) \ @WITH_HOCR_TRUE@ $(hspell_CFLAGS) \ @WITH_HOCR_TRUE@ $(tiff_CFLAGS) \ @WITH_HOCR_TRUE@ $(fftw_CFLAGS) \ @WITH_HOCR_TRUE@ -DBUILD=\"$(BUILD_STR)\" @WITH_HOCR_TRUE@hocr_LDADD = \ @WITH_HOCR_TRUE@ $(glib_LIBS) \ @WITH_HOCR_TRUE@ $(gtk_LIBS) \ @WITH_HOCR_TRUE@ $(hspell_LIBS) \ @WITH_HOCR_TRUE@ $(tiff_LIBS) \ @WITH_HOCR_TRUE@ $(fftw_LIBS) \ @WITH_HOCR_TRUE@ $(libhocr_la_LIBADD) \ @WITH_HOCR_TRUE@ $(top_builddir)/src/*.o -lm all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/hocr/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/hocr/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done hocr$(EXEEXT): $(hocr_OBJECTS) $(hocr_DEPENDENCIES) @rm -f hocr$(EXEEXT) $(hocr_LINK) $(hocr_OBJECTS) $(hocr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hocr-hocr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< hocr-hocr.o: hocr.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hocr_CFLAGS) $(CFLAGS) -MT hocr-hocr.o -MD -MP -MF $(DEPDIR)/hocr-hocr.Tpo -c -o hocr-hocr.o `test -f 'hocr.c' || echo '$(srcdir)/'`hocr.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/hocr-hocr.Tpo $(DEPDIR)/hocr-hocr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hocr.c' object='hocr-hocr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hocr_CFLAGS) $(CFLAGS) -c -o hocr-hocr.o `test -f 'hocr.c' || echo '$(srcdir)/'`hocr.c hocr-hocr.obj: hocr.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hocr_CFLAGS) $(CFLAGS) -MT hocr-hocr.obj -MD -MP -MF $(DEPDIR)/hocr-hocr.Tpo -c -o hocr-hocr.obj `if test -f 'hocr.c'; then $(CYGPATH_W) 'hocr.c'; else $(CYGPATH_W) '$(srcdir)/hocr.c'; fi` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/hocr-hocr.Tpo $(DEPDIR)/hocr-hocr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hocr.c' object='hocr-hocr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hocr_CFLAGS) $(CFLAGS) -c -o hocr-hocr.obj `if test -f 'hocr.c'; then $(CYGPATH_W) 'hocr.c'; else $(CYGPATH_W) '$(srcdir)/hocr.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/examples/Makefile.am0000644000175000017500000000004211017002616014063 00000000000000SUBDIRS = hocr hocr-gtk bindings libhocr-0.10.17/examples/Makefile.in0000644000175000017500000003523011043604650014110 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = hocr hocr-gtk bindings all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/examples/bindings/0000777000175000017500000000000011051630066013720 500000000000000libhocr-0.10.17/examples/bindings/hocr_cpp.cpp0000644000175000017500000000335311017002616016135 00000000000000// // hocr_c.c // // example file for libhocr. // compile: g++ `pkg-config --libs --cflags libhocr-gtk` -o hocr_cpp hocr_cpp.cpp // use: hocr_cpp IMAGE_FILENAME // // Copyright (C) 2008 Yaacov Zamir // // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // #include #include #include // we will use hocr-gtk in this example to load // images #include // when we use hocr-gtk we also need gtk using namespace std; using namespace hocr; int main (int argc, char *argv[]) { ho_pixbuf *pix = NULL; Hocr *ocr_obj = NULL; // we use hocr-gtk, we need to init gtk gtk_init (&argc, &argv); // load the picture pointed to by argv[1] /* NOTE: this program use the hocr-gtk functions to load images */ pix = ho_gtk_pixbuf_load (argv[1]); // create a new hocr object ocr_obj = new Hocr (pix); // do ocr on picture ocr_obj->do_ocr (); // print out the text cout << ocr_obj->get_text () << endl; // free ocr object /* NOTE: the picture will be deleted as part of the object */ delete (ocr_obj); return 0; } libhocr-0.10.17/examples/bindings/Makefile.am0000644000175000017500000000026611041065240015667 00000000000000EXTRA_DIST = hocr_c.c hocr_cpp.cpp hocr_python.py examples_binding_dir = ${prefix}/share/doc/libhocr/examples/bindings examples_binding__DATA = hocr_c.c hocr_cpp.cpp hocr_python.py libhocr-0.10.17/examples/bindings/hocr_c.c0000644000175000017500000000320111017002616015225 00000000000000 /* * hocr_c.c * * example file for libhocr. * compile: gcc -I/usr/include/libhocr -lm -lhocr -o hocr_c hocr_c.c * use: hocr_c IMAGE_FILENAME * * Copyright (C) 2008 Yaacov Zamir */ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include int main (int argc, char *argv[]) { ho_pixbuf *pix = NULL; ho_string *text = NULL; int progress; /* load the pnm picture pointed to by argv[1] */ /* NOTE: this function only load pnm images, you can use the hocr-gtk * functions to load other image types */ pix = ho_pixbuf_pnm_load (argv[1]); /* get a new text buffer */ text = ho_string_new (); /* do ocr on picture */ /* NOTE: we do not use the progress indicator in this program. to use it, * create a new thread and sample the value of progress periodically */ hocr_do_ocr (pix, text, 0, 0, &progress); /* print out the text */ printf (text->string); /* free picture */ ho_pixbuf_free (pix); /* free string */ ho_string_free (text); return 0; } libhocr-0.10.17/examples/bindings/Makefile.in0000644000175000017500000002521611043604650015710 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples/bindings DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(examples_binding_dir)" examples_binding_DATA_INSTALL = $(INSTALL_DATA) DATA = $(examples_binding__DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = hocr_c.c hocr_cpp.cpp hocr_python.py examples_binding_dir = ${prefix}/share/doc/libhocr/examples/bindings examples_binding__DATA = hocr_c.c hocr_cpp.cpp hocr_python.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/bindings/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/bindings/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-examples_binding_DATA: $(examples_binding__DATA) @$(NORMAL_INSTALL) test -z "$(examples_binding_dir)" || $(MKDIR_P) "$(DESTDIR)$(examples_binding_dir)" @list='$(examples_binding__DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(examples_binding_DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(examples_binding_dir)/$$f'"; \ $(examples_binding_DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(examples_binding_dir)/$$f"; \ done uninstall-examples_binding_DATA: @$(NORMAL_UNINSTALL) @list='$(examples_binding__DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(examples_binding_dir)/$$f'"; \ rm -f "$(DESTDIR)$(examples_binding_dir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(examples_binding_dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-examples_binding_DATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examples_binding_DATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-examples_binding_DATA install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am \ uninstall-examples_binding_DATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/examples/bindings/hocr_python.py0000644000175000017500000000211011017002616016530 00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- # # hocr_python.py # # example file for libhocr. # use: python hocr_python.py IMAGE_FILENAME # # Copyright (C) 2008 Yaacov Zamir # # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # for user arg import sys from hocr import * # load the picture pointed to by argv[1] pix = ho_pixbuf_pnm_load(sys.argv[1]) # create a new hocr object hocr_obj = Hocr(pix) # do ocr hocr_obj.do_ocr() # print text print hocr_obj.get_text() libhocr-0.10.17/examples/hocr-gtk/0000777000175000017500000000000011051630065013640 500000000000000libhocr-0.10.17/examples/hocr-gtk/sane-pygtk.glade0000644000175000017500000012733511017002616016644 00000000000000 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _File True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Preview True gtk-refresh True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Scan True gtk-save True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-quit True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Edit True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Reset settings to defaults True gtk-refresh True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Save current settings as defaults True gtk-save True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _View True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-in True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-out True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-100 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Help True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-about True True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 GTK_SHADOW_IN True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 2 5 5 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 150 0 300 1 10 10 1 2 2 3 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 Scanner: True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 Mode: PANGO_ELLIPSIZE_START 1 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 Resolution: 2 3 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 Brightness: 3 4 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 Contrast: 4 5 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 Window: 5 6 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 2 1 2 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 0 100 1 10 10 1 2 3 4 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 0 100 1 10 10 1 2 4 5 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK (0,0) - (100,100) 1 2 5 6 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Reset 0 False False 5 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Settings True label_item False False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 GTK_SHADOW_IN True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 2 5 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Save as: True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-quit True 0 False False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Scan 0 False False 1 5 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Scan True label_item False False 5 1 False False 5 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 GTK_SHADOW_IN True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 260 360 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK GTK_RESIZE_QUEUE True GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_SCROLL_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Preview True label_item True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Update preview 0 False False 5 1 5 1 5 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 False 2 libhocr-0.10.17/examples/hocr-gtk/gettext-bootstrap.sh0000644000175000017500000000243211017002616017605 00000000000000#!/usr/sh # make locale dir mkdir -p he mkdir -p sv # hocr-gtk intltool-extract --type=gettext/glade hocr-gtk.glade xgettext --language=Python --keyword=_ --keyword=N_ --output=hocr-gtk.pot hocr-gtk hocr-gtk.glade.h if ( test -e he_hocr-gtk.po ); then msgmerge --update he_hocr-gtk.po hocr-gtk.pot else msginit --input=hocr-gtk.pot --output he_hocr-gtk.po --locale=he_IL.utf-8 fi if ( test -e sv_hocr-gtk.po ); then msgmerge --update sv_hocr-gtk.po hocr-gtk.pot else msginit --input=hocr-gtk.pot --output sv_hocr-gtk.po --locale=sv_SE.utf-8 fi msgfmt --output-file=he/hocr-gtk.mo he_hocr-gtk.po msgfmt --output-file=sv/hocr-gtk.mo sv_hocr-gtk.po # sane-pygtk intltool-extract --type=gettext/glade sane-pygtk.glade xgettext --language=Python --keyword=_ --keyword=N_ --output=sane-pygtk.pot sane-pygtk sane-pygtk.glade.h if ( test -e he_sane-pygtk.po ); then msgmerge --update he_sane-pygtk.po sane-pygtk.pot else msginit --input=sane-pygtk.pot --output he_sane-pygtk.po --locale=he_IL.utf-8 fi if ( test -e sv_sane-pygtk.po ); then msgmerge --update sv_sane-pygtk.po sane-pygtk.pot else msginit --input=sane-pygtk.pot --output sv_sane-pygtk.po --locale=sv_SE.utf-8 fi msgfmt --output-file=he/sane-pygtk.mo he_sane-pygtk.po msgfmt --output-file=sv/sane-pygtk.mo sv_sane-pygtk.po libhocr-0.10.17/examples/hocr-gtk/hocr1-128.png0000644000175000017500000003452211017002616015611 00000000000000PNG  IHDR>asBIT|dtEXtSoftwarewww.inkscape.org< IDATxiu{O  H.”LSz_^-ʮ׎YUI/T:Ǖ|r76Ҏeh,np[wO,7~y{ >U}={ι{RoO>Y7+'m/n*P.-;"@pk%J@~]F;߾jsRboMm@ah {ƹ tW)2Pjr^!|X1s,̭7Лv$@5~@#~o!OV?j(  iPUUֽhi躎(!?mnԴknڶ-׬jےMl}H{p[+Mŭmh]SB@Hߚ hmCܸ$|NooxZ:v޺޾RJ;5}m[:;* o6\ѸѢnBK))MJT*bk }Ob" Ҫ* f[y %܁Jb3$ե)ѧѢ=yd5BA%P;fn=9NJPӰ9"oQp@hH5mP0 Ed~ZF#h^e0}2i03}}<}T'rH85˭訪iXE$0 )i躎h4__p!y~_O_򗌌P,g>åK(rdRD*ʕ+UT=LDZo<_bEDT/i!OzPxNado>Q)j5D5܁P4#Z  > v%C|4TKy9RHǙ8p/\67I2َNhF*0 1Mv~k_Cu87n;w/| $ &]&׿P>ц9zRZe6)Ֆ. ˨"}ᵀO8{v0@'LjիBK q.M0 \ Çp1o_&!L2>>% cY@n޼˗ٿ-V2QE6~*Ҷ0r3TW>Anci@ mT3׈<ETF3ڤ[iض\O*2UQZf$'9H8{.3k׮lreRChk!Lduu۶0(躎eYy* ~!DUU~*s.]²,bl{!7oJ3`f&r3@J bW25R"i؎ڐHKK(9.bW2,L}LW8W~; 3=}l6mZ6˲mrLZbH$!RV)uĉ,..r8qgjj tC׮] I,Xwy`0H.spL_}M|*)):=p9 &jA?tb Nѯ-QJOsBBb %(c(OpmaЖhӏ?H:" #Iw{``0b!axx)%211I.կzۮ7{ַz !9s2Lh<vxaL@.*libqwK % (EQTmfQ]TrL(jzΗ%ojg]muF]irױQBڜP2ϑwHajJ溗fRI_'uPTT=B%;E|UD%W`U=OJ(wM]e;hhvr`+SF,"f0ωOW'N=xl6K6%B"DjJRAJI04Mv;Iژɓ,--q9;FXdyyN:fppIY]]Z:A.b``X,cGFXot{6@00 TU%s˗|fΠGRt09sQLR~- }%rjzUNcPAv=Øl1Kr=ډ]^$Ү:ҪI~}E%襼xb 2W/ò3?7/$۱mx,edQ:lrBEQH,--!^>?`yy`0C/_fxxz_>~`&o&/2ˤF~m$r&@u]4N__&tQCIO)ډZk%تBCe@AQ5j_}X,ÇRrnݺEhkkCJOT0A6mDۈFCSQgݻzگ](8z]FFFطtttٹ~r㎭f5wt$@ P\׽IM*(@xy hts7IP(P,)JdY[or5^x|I^z%)|Ǽ\|EQLOOsa~;000~3:"vOkR.`{% 4BQFeuHjŏIpETUGC1';A '0 ʫ!0X|5ډ8!ZqziVI>"YBaP>fn70m[rlp}zjr/lݳ@ԑ8 B@J9i#AtGct :ZTT1&㻌o]$?35 :Tw3w>a+}d+#Е݌ ?U  ]ZX<6+GZzqF| {OG},ܼu|!kص0MJضu]RfqR,z*m ڨT*!#N355幓ɤsAɭlf.U!xUa%UT=Q m PY&8Iarų^/ϱ8OXvΞy+Y^ZT,FYZZ1B+++ BrL>_fddH)V\z3gΐJ0MW^yh$RJfgg={˗/_Re``.8y$*N>$Ifggy ~Z+DNKXjuh>p!*e '>Y@ vljGݮ*@ץ q׵rm TU%HvǑR=J%<\q>9> Xgᖁ UU(hBٴʍc)ʹbQr'}}Bm$R-bVZL#B(KR`UK=քNFN m Zc$!}~؉9<+9|/. đf1MKT*kce]9{,djJ4eff{_Ε+W8pxUQU{Ge BNP6ͲWU7,6.HEP_g?P`PUuQ΁mYZL#-Z(bV <@F)4 m!"Wdk,LqX]޽\*O?}Y^|7:XZZ$ɰB:Fu LOO{KӨ*a055??K/乍\rw}˗/ pT;w/mfNFO`K fn.z&Np#hB[jCX,HS_!tSu"H &IV)Ђ`i`V  Uw ,Ccsy~ C.#Gpu$uEˠr;Q<!8q]]]ܸqó FGGڵk|_e('q{ l)(.S];0YS_?dK[(՞ѾTAT=Kp>ײ-R@$X sH)@UUw1;;eM~mOO=66VwDB_.7NA1TMNJ))Q^,RX $x,S-P^CZUr A%DsJa鼛0z˨`e*E i K9g( Wܺ>i?b!j6m۔JnJ+iR.R,e)\rnS/NN)LMMDRaffkNz>u?6i+DԁZf}*@Q>PQXfևh(C}o_B&컇ja17h0F&|R@S$UEF *6 V.}>q_O0 ww%?aqq\nX4<}}}Xv]r9'ru~300ݼ |_8x /HӄaN8 ׯ_GQN8o~GmxwuV-UuT5mLwN>  bBn*]#`xH=TJ *@@ECQTh;Q&Tk ڶdh0@RH$AW sss=zp۶bro>J%n޼ѣGxGgŋ@tvv\.drezzz{Ѱ^W+JˇSu=laJԉ yAwAb8t5{Q@T ł3^u5ݦ>mۋ%I??\w7ݤHѪSJ'Ŷ,TM9dS#_}`$A{=ؖI!3G-Y)bUNrSb(F!I:QΣg'l5mN>@Om3ob!PO+qOQ,'G( t|++mmq* `J(X9 àRrg<3%,,,`&Fell[nJT*  O?? .,a( ^9Z mE" ^u8?<=/׾eY?%H`Y |o۔eoGa6;,Ec{&ECӨ D FhDU OIDATضꎋp*MMGֵQN4}G:x7FDcQZF":b1m ?aH)cvv#G055>9J%=eY8pWO<(D\.Յi~gО&DWuNa^7@2xog~-5H[C>]wlУOt9}t\ʡ{Sփ: S8iF!23#8xnD1ǥ\TD"}^z{ߏF9r䈷_XtяP=Bl .LcozeV1*E/)eaB^ׯ_#$n:rki ݉JfdYBw N3p\y48p R>M!3eV;ItR-ȥg1+E?2sr]* %(F`V;i*2e B6ȇg_a=}"QǎrȓT+/9R^7n0;;K<fy'y7\x$֭[d28\velcrr} VBoW%T,/٫DRr:G+3I8޹AFA ̭IB(C-}T`(m\cm Zn6`M&( tvv288XXX@uOR)8vD"OjD"R333>|}H$pQF=ڪ@,rY4&:fn]mO}j{4Hҵ''(F(VHQ`~:OW,$PQࡇ?M(W^FQU///Qw#MLLxFh44v htE^t0)%v-3D 7hZTQr^\J6+u榮9F]H'P s7n|7ow믿IW_}麐VaOn+,axɏ.7)o]IXux{=c3sݣrW@⭋=Ftcy:&.g.%g uZZ*AlJZ&oRj,/RMu7aT mT i 4 O+R N*(msM/d2Ν;G6|_Ķm{INkטK@+ *IH)iVU؄"qb=I]eg2t SĽñ~g@(B8$K1;ϑGxݪ%"mu ]Xf"&֙UU@[)A@'ώ:N֑BP`ftttPT8q RRT蠻Y?;\OO]]]muǤUuoDZ:cOrqnFG/r5a6TJζ'Bggg]?H$黩Nr5c2lij*7jYu]Rp:un|A9{ Yk%S riiJ)-{HF5\/O]a~* SW.mOoVB!wY~on9edG]w>uKunZ\t]4e8/Vܴ:f1 c]J6ݷj5|zrqwI\GҾiknhCVeHL&CZ]6™7,I6Kۑ^RJl^#!x >{RgoG@.rneOr(]SÚen>t^ӞIMPVf2Jض!5OؐmKlD׼C|}ӧFZ'IS6@&,911,5vic Voy9qm4j64E7גBL*\FZbv( #Mpcv m{fўH7 0G@Y7̽Sn&yT6 08qFwaBh#9Bqr(W# jVmo`T8]t3̡ ̺g|DYBά ՒL&au]oȴltj>6'HO50As+ۦ= 6pqUfT*TJ kmK?A(% =@gXƙE\}B>~7_ t؎ep"[-1"v±v±$$<͒%=ᖞ>6Xe_oAuMg2k% p.H kd[ѡ\R_]m;],ju̮-g¯AE5zh]]hMӰG$hPӠl&N{ÚF"}G V}#RUus]txτ(J)_7 fVq=hÞyqQJꢽh4J,[7vSm](ʆpzz{E8\s&w[@r@p4;wN;w{ MBD":;;줻[R)R"M'S8. T롵IuyL$ϋ|>wI_Hp8L$qpXDQ(p;ߙ(bmRK!Xl v_3 [ݠ=CKlK+v\F{sz, zǼ|Aow0;)H>lq:nў HRʌAA'zHd^;Mnl4?eJ%t Q o&)>)!?A 1<L#~ATnv~6{4R[rV恫Bq| )"Y[8No$?ZD6΋tpݖB+p{2kخPMrp@VB8nqPŷϝD?vؐeYm۪eYZ:e\g&ݢvJ{%)(lڟub8cxc: zjz+IPf*nh:;6r i'FP-*~Y mVm\odw MvU@#06{@{;7ZW/R/0 a0MST* #O|Lna]\z5ǝ|ieJh|min2k~9F`JK|;lpBj>?i]MOOS,:?I$ضŋae6L٤u,dWE' -1\mXawySSS(9i D8t t]' M$q|4e__gϞP((]KŶm7ޘUeò]ʷ{'!D# 3=~?I=ss2c7NN% baHw(vZ5qe%tw @7gyD48pxp_om&m'UUڼi\emBH˲"e8w k?61]ccrmiu׽f)v &"uZK@h| FILR^f歌VdYfF@Q)e-5=@+8odfwS|+Q2#plGRK;j;u+1Xڶm[5lj I:caۤyvݔV nFm`1f.D|#X[K|}l6??IɞJeejEm;dv2( H)8ijҟg}[vZۢۖ FKU٨ת4oV~R_x8s=8pNo;lb(iTUqRuSkMmh^dö;Bldb !ۑ;QFlVntX c\.7t…؅ B줧v$$ ;Fm:\4M\YRJqk04gdcm_؛ȋ l"-;\j:b1Q,n݊ŭ en1EQښtZjv?aXlYw?mv fFV sf NWGkeivH7k[&w;7nz-NJmYY$m+ŭ\z+T ufC{߭~Ƕ mmit'+N ݬ9gvۍnd3};~^~hx]?ky6wZƭB.gv~qcQ+kYlkFh߸i%i Q,`h%=&jfĠ] @Zƍmw#"}+j}q~0ZE7R[Q#uR6utݰ>8of!d 53of򫃍fjbM+OƎt#͘7󭘿Fhfk+CͰ]؋=B[#[u ·͙Y]nfvF> `1h=h͇(ޛ8F~3KͿUC˄fa3m̹c{Z$1̹EXEF̿] _o ZIVyw~DP=Rf5fUf-VFbmky};OE6or3{`#u7$ t-߈:3Q*vB[nV'5`c=ͨ{!bx{CIENDB`libhocr-0.10.17/examples/hocr-gtk/hocr-gtk.desktop0000644000175000017500000000023211051617352016666 00000000000000[Desktop Entry] Name=hocr-gtk Name[he]=hocr-gtk Exec=hocr-gtk Icon=hocr1-48 Terminal=false Type=Application Categories=GTK;Office;OCR; StartupNotify=true libhocr-0.10.17/examples/hocr-gtk/Makefile.am0000644000175000017500000000157611017002616015616 00000000000000EXTRA_DIST = hocr-gtk.desktop hocr1-48.png hocr1-128.png \ hocr-gtk.glade hocr-gtk hocr-gtk.desktop \ sane-pygtk.glade sane-pygtk sane-pygtk.desktop \ gettext-bootstrap.sh hocr-gtk.pot sane-pygtk.pot \ he_hocr-gtk.po sv_hocr-gtk.po \ he_sane-pygtk.po sv_sane-pygtk.po \ he/hocr-gtk.mo sv/hocr-gtk.mo \ he/sane-pygtk.mo sv/sane-pygtk.mo if WITH_HOCR_GTK bin_SCRIPTS = hocr-gtk sane-pygtk Applicationsdir = $(datadir)/applications Applications_DATA = hocr-gtk.desktop sane-pygtk.desktop Pixmapssdir = $(datadir)/pixmaps Pixmapss_DATA = hocr1-48.png hocr1-128.png Gladedir = $(datadir)/hocr-gtk/glade Glade_DATA = hocr-gtk.glade Gladesanedir = $(datadir)/sane-pygtk/glade Gladesane_DATA = sane-pygtk.glade Mohedir = $(datadir)/locale/he/LC_MESSAGES/ Mohe_DATA = he/hocr-gtk.mo he/sane-pygtk.mo Mosvdir = $(datadir)/locale/sv/LC_MESSAGES/ Mosv_DATA = sv/hocr-gtk.mo sv/sane-pygtk.mo endif libhocr-0.10.17/examples/hocr-gtk/he/0000777000175000017500000000000011051630065014234 500000000000000libhocr-0.10.17/examples/hocr-gtk/he/sane-pygtk.mo0000644000175000017500000000346011044146243016574 00000000000000%0 1I=4&   $-<DJPV_"{Q w ^G(9@X al|  0 %    Brightness:Can't load sane-pygtk's glade GUI file, check your install. Exit program.Can't scan preview image, %s, Check scanner settingsCan't scan, %s, Check scanner settingsContrast:Mode:PreviewResetResolution:Save as:ScanScanner:SettingsUpdate previewWindow:_Edit_File_Help_Preview_Reset settings to defaults_Save current settings as defaults_Scan_ViewProject-Id-Version: libhocr 0.10.9 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-05-11 08:22+0300 PO-Revision-Date: 2008-05-11 08:22+0300 Last-Translator: kobi Language-Team: Hebrew MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); בהירותלא מצליח לקרוא את קובץ ה glade של sane-pygtk, בדוק את ההתקנה. יוצא מהתכנית.לא מצליח לסרוק תמונה מקדימה %s, בדקו את הגדרות הסריקהלא מצליח לסרוק, %s, בדקו את הגדרות הסריקהניגודיותמצבתמונה מקדימהאתחלהפרדהשמור בשםסרוקסורקהגדרותעדכןחלוןעריכהקובץעזרהתצוגה מקדימהאתחלשמור מצב נוכחי כברירת מחדלסרוקתצוגהlibhocr-0.10.17/examples/hocr-gtk/he/hocr-gtk.mo0000644000175000017500000000652211044146243016232 00000000000000=S89Ia { J)0 C O[b ky $  ! '0 5AEMS[bgpx}     QT $f $    V b m         & ,; h t  &       8 A J Q \ i p {           , @ 2 1 =-) :6 7+% $,4<"50* 8#3&(;!./9'Black and WhiteClosed, no files scanedClosed, no files selectedDirectionEngineFontFont Recognition...Font splicingHocr-GTK, Hebrew optical character recognition graphical front end (GTK) ImageImage Processing...Image processingLayoutLayout Analysis...Line leewayLinguisticsOpen..OriginalProcessing...Save..ScaleScanSet text fontShlomi Israel ThresholdThreshold typeWord spacingYaacov Zamir _Edit_File_Help_Viewadaptiveagresiveautoauto rotatebigcarefulclearclosingcolumndarkdilationerosionfinefreelightnikudnormalone columnopeningregularsmallspacedtighttranslator-creditsvery darkvery lightvery spacedvery tightProject-Id-Version: libhocr 0.10.9 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-07-30 23:14+0300 PO-Revision-Date: 2008-05-11 08:22+0300 Last-Translator: kobi Language-Team: Hebrew MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); שחור ולבןסוגר. לא נסרקו קבציםסוגר. לא נבחרו קבציםכיווןמנועסוג אותזיהוי תווים ...חיתוך בין אותיותHocr-GTK, מזהה תווים אופטי עברי מנשק משתמש גרפי (GTK) תמונהעיבוד תמונה ...עיבוד תמונהעימודזיהוי עימוד ...רווח בין שורותלשוןפתח..מקורימעבד ...שמור..הגדלהסרוקקבע סוג אותשלומי ישראל רמת סףסוג רמת סףריווח בין מיליםיעקב זמיר עריכהקובץעזרהתצוגהגמישאגרסיביאוטומאטיסיבוב אוטומאטיגדולזהירנקהסגירהעמודותכהההרחבהשחיקהעדיןחופשיבהירניקודרגילעמודה אחתפתיחהרגילקטןמרווחצפוףיעקב זמירמאוד כההמאוד בהירמאוד מרווחמאוד צפוףlibhocr-0.10.17/examples/hocr-gtk/he_hocr-gtk.po0000644000175000017500000001441511044146231016312 00000000000000# Hebrew translations for libhocr package. # Copyright (C) 2008 THE libhocr'S COPYRIGHT HOLDER # This file is distributed under the same license as the libhocr package. # kobi , 2008. # msgid "" msgstr "" "Project-Id-Version: libhocr 0.10.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-07-30 23:14+0300\n" "PO-Revision-Date: 2008-05-11 08:22+0300\n" "Last-Translator: kobi \n" "Language-Team: Hebrew\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: hocr-gtk:78 msgid "" "Hocr-GTK, Hebrew optical character recognition\n" "graphical front end (GTK)\n" "\n" msgstr "" "Hocr-GTK, מזהה תווים אופטי עברי\n" "מנשק משתמש גרפי (GTK)\n" "\n" #: hocr-gtk:80 msgid "Shlomi Israel " msgstr "שלומי ישראל " #: hocr-gtk:81 msgid "Yaacov Zamir " msgstr "יעקב זמיר " #: hocr-gtk:186 msgid "Image Processing..." msgstr "עיבוד תמונה ..." #: hocr-gtk:199 msgid "Layout Analysis..." msgstr "זיהוי עימוד ..." #: hocr-gtk:202 msgid "Font Recognition..." msgstr "זיהוי תווים ..." #: hocr-gtk:261 hocr-gtk:359 msgid "Processing..." msgstr "מעבד ..." #: hocr-gtk:455 msgid "" "Can't load hocr's glade GUI file, check your install.\n" "Exit program." msgstr "" #: hocr-gtk:748 msgid "Open.." msgstr "פתח.." #: hocr-gtk:776 hocr-gtk:797 msgid "Closed, no files selected" msgstr "סוגר. לא נבחרו קבצים" #: hocr-gtk:784 msgid "Save.." msgstr "שמור.." #: hocr-gtk:973 msgid "Closed, no files scaned" msgstr "סוגר. לא נסרקו קבצים" #: hocr-gtk:1118 msgid "translator-credits" msgstr "יעקב זמיר" #: hocr-gtk:1129 msgid "Set text font" msgstr "קבע סוג אות" #: hocr-gtk.glade.h:1 msgid "1" msgstr "" #: hocr-gtk.glade.h:2 msgid "2" msgstr "" #: hocr-gtk.glade.h:3 msgid "3" msgstr "" #: hocr-gtk.glade.h:4 msgid "4" msgstr "" #: hocr-gtk.glade.h:5 msgid "Black and White" msgstr "שחור ולבן" #: hocr-gtk.glade.h:6 msgid "Direction" msgstr "כיוון" #: hocr-gtk.glade.h:7 msgid "Engine" msgstr "מנוע" #: hocr-gtk.glade.h:8 msgid "Font" msgstr "סוג אות" #: hocr-gtk.glade.h:9 msgid "Font 1" msgstr "" #: hocr-gtk.glade.h:10 msgid "Font 2" msgstr "" #: hocr-gtk.glade.h:11 msgid "Font 3" msgstr "" #: hocr-gtk.glade.h:12 msgid "Font 4" msgstr "" #: hocr-gtk.glade.h:13 msgid "Font 5" msgstr "" #: hocr-gtk.glade.h:14 msgid "Font 6" msgstr "" #: hocr-gtk.glade.h:15 msgid "Font splicing" msgstr "חיתוך בין אותיות" #: hocr-gtk.glade.h:16 msgid "Hocr" msgstr "" #: hocr-gtk.glade.h:17 msgid "Image" msgstr "תמונה" #: hocr-gtk.glade.h:18 msgid "Image processing" msgstr "עיבוד תמונה" #: hocr-gtk.glade.h:19 msgid "LTR" msgstr "" #: hocr-gtk.glade.h:20 msgid "Layout" msgstr "עימוד" #: hocr-gtk.glade.h:21 msgid "Line leeway" msgstr "רווח בין שורות" #: hocr-gtk.glade.h:22 msgid "Linguistics" msgstr "לשון" #: hocr-gtk.glade.h:23 msgid "Ocrad" msgstr "" #: hocr-gtk.glade.h:24 msgid "Original" msgstr "מקורי" #: hocr-gtk.glade.h:25 msgid "RTL" msgstr "" #: hocr-gtk.glade.h:26 msgid "Scale" msgstr "הגדלה" #: hocr-gtk.glade.h:27 msgid "Scan" msgstr "סרוק" #: hocr-gtk.glade.h:28 msgid "Tesseract" msgstr "" #: hocr-gtk.glade.h:29 msgid "Threshold" msgstr "רמת סף" #: hocr-gtk.glade.h:30 msgid "Threshold type" msgstr "סוג רמת סף" #: hocr-gtk.glade.h:31 msgid "Word spacing" msgstr "ריווח בין מילים" #: hocr-gtk.glade.h:32 msgid "_Edit" msgstr "עריכה" #: hocr-gtk.glade.h:33 msgid "_File" msgstr "קובץ" #: hocr-gtk.glade.h:34 msgid "_Help" msgstr "עזרה" #: hocr-gtk.glade.h:35 msgid "_View" msgstr "תצוגה" #: hocr-gtk.glade.h:36 msgid "adaptive" msgstr "גמיש" #: hocr-gtk.glade.h:37 msgid "agresive" msgstr "אגרסיבי" #: hocr-gtk.glade.h:38 msgid "auto" msgstr "אוטומאטי" #: hocr-gtk.glade.h:39 msgid "auto rotate" msgstr "סיבוב אוטומאטי" #: hocr-gtk.glade.h:40 msgid "big" msgstr "גדול" #: hocr-gtk.glade.h:41 msgid "careful" msgstr "זהיר" #: hocr-gtk.glade.h:42 msgid "clear" msgstr "נקה" #: hocr-gtk.glade.h:43 msgid "closing" msgstr "סגירה" #: hocr-gtk.glade.h:44 msgid "column" msgstr "עמודות" #: hocr-gtk.glade.h:45 msgid "dark" msgstr "כהה" #: hocr-gtk.glade.h:46 msgid "dilation" msgstr "הרחבה" #: hocr-gtk.glade.h:47 msgid "erosion" msgstr "שחיקה" #: hocr-gtk.glade.h:48 msgid "fine" msgstr "עדין" #: hocr-gtk.glade.h:49 msgid "free" msgstr "חופשי" #: hocr-gtk.glade.h:50 msgid "gtk-about" msgstr "" #: hocr-gtk.glade.h:51 msgid "gtk-apply" msgstr "" #: hocr-gtk.glade.h:52 msgid "gtk-copy" msgstr "" #: hocr-gtk.glade.h:53 msgid "gtk-cut" msgstr "" #: hocr-gtk.glade.h:54 msgid "gtk-delete" msgstr "" #: hocr-gtk.glade.h:55 msgid "gtk-new" msgstr "" #: hocr-gtk.glade.h:56 msgid "gtk-paste" msgstr "" #: hocr-gtk.glade.h:57 msgid "gtk-quit" msgstr "" #: hocr-gtk.glade.h:58 msgid "gtk-revert-to-saved" msgstr "" #: hocr-gtk.glade.h:59 msgid "gtk-save" msgstr "" #: hocr-gtk.glade.h:60 msgid "gtk-select-font" msgstr "" #: hocr-gtk.glade.h:61 msgid "gtk-zoom-100" msgstr "" #: hocr-gtk.glade.h:62 msgid "gtk-zoom-fit" msgstr "" #: hocr-gtk.glade.h:63 msgid "gtk-zoom-in" msgstr "" #: hocr-gtk.glade.h:64 msgid "gtk-zoom-out" msgstr "" #: hocr-gtk.glade.h:65 msgid "html" msgstr "" #: hocr-gtk.glade.h:66 msgid "light" msgstr "בהיר" #: hocr-gtk.glade.h:67 msgid "nikud" msgstr "ניקוד" #: hocr-gtk.glade.h:68 msgid "normal" msgstr "רגיל" #: hocr-gtk.glade.h:69 msgid "one column" msgstr "עמודה אחת" #: hocr-gtk.glade.h:70 msgid "opening" msgstr "פתיחה" #: hocr-gtk.glade.h:71 msgid "regular" msgstr "רגיל" #: hocr-gtk.glade.h:72 msgid "small" msgstr "קטן" #: hocr-gtk.glade.h:73 msgid "spaced" msgstr "מרווח" #: hocr-gtk.glade.h:74 msgid "tight" msgstr "צפוף" #: hocr-gtk.glade.h:75 msgid "very dark" msgstr "מאוד כהה" #: hocr-gtk.glade.h:76 msgid "very light" msgstr "מאוד בהיר" #: hocr-gtk.glade.h:77 msgid "very spaced" msgstr "מאוד מרווח" #: hocr-gtk.glade.h:78 msgid "very tight" msgstr "מאוד צפוף" libhocr-0.10.17/examples/hocr-gtk/Makefile.in0000644000175000017500000004031211043604650015623 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples/hocr-gtk DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(Applicationsdir)" \ "$(DESTDIR)$(Gladedir)" "$(DESTDIR)$(Gladesanedir)" \ "$(DESTDIR)$(Mohedir)" "$(DESTDIR)$(Mosvdir)" \ "$(DESTDIR)$(Pixmapssdir)" binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; ApplicationsDATA_INSTALL = $(INSTALL_DATA) GladeDATA_INSTALL = $(INSTALL_DATA) GladesaneDATA_INSTALL = $(INSTALL_DATA) MoheDATA_INSTALL = $(INSTALL_DATA) MosvDATA_INSTALL = $(INSTALL_DATA) PixmapssDATA_INSTALL = $(INSTALL_DATA) DATA = $(Applications_DATA) $(Glade_DATA) $(Gladesane_DATA) \ $(Mohe_DATA) $(Mosv_DATA) $(Pixmapss_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = hocr-gtk.desktop hocr1-48.png hocr1-128.png \ hocr-gtk.glade hocr-gtk hocr-gtk.desktop \ sane-pygtk.glade sane-pygtk sane-pygtk.desktop \ gettext-bootstrap.sh hocr-gtk.pot sane-pygtk.pot \ he_hocr-gtk.po sv_hocr-gtk.po \ he_sane-pygtk.po sv_sane-pygtk.po \ he/hocr-gtk.mo sv/hocr-gtk.mo \ he/sane-pygtk.mo sv/sane-pygtk.mo @WITH_HOCR_GTK_TRUE@bin_SCRIPTS = hocr-gtk sane-pygtk @WITH_HOCR_GTK_TRUE@Applicationsdir = $(datadir)/applications @WITH_HOCR_GTK_TRUE@Applications_DATA = hocr-gtk.desktop sane-pygtk.desktop @WITH_HOCR_GTK_TRUE@Pixmapssdir = $(datadir)/pixmaps @WITH_HOCR_GTK_TRUE@Pixmapss_DATA = hocr1-48.png hocr1-128.png @WITH_HOCR_GTK_TRUE@Gladedir = $(datadir)/hocr-gtk/glade @WITH_HOCR_GTK_TRUE@Glade_DATA = hocr-gtk.glade @WITH_HOCR_GTK_TRUE@Gladesanedir = $(datadir)/sane-pygtk/glade @WITH_HOCR_GTK_TRUE@Gladesane_DATA = sane-pygtk.glade @WITH_HOCR_GTK_TRUE@Mohedir = $(datadir)/locale/he/LC_MESSAGES/ @WITH_HOCR_GTK_TRUE@Mohe_DATA = he/hocr-gtk.mo he/sane-pygtk.mo @WITH_HOCR_GTK_TRUE@Mosvdir = $(datadir)/locale/sv/LC_MESSAGES/ @WITH_HOCR_GTK_TRUE@Mosv_DATA = sv/hocr-gtk.mo sv/sane-pygtk.mo all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/hocr-gtk/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/hocr-gtk/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-ApplicationsDATA: $(Applications_DATA) @$(NORMAL_INSTALL) test -z "$(Applicationsdir)" || $(MKDIR_P) "$(DESTDIR)$(Applicationsdir)" @list='$(Applications_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(ApplicationsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Applicationsdir)/$$f'"; \ $(ApplicationsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Applicationsdir)/$$f"; \ done uninstall-ApplicationsDATA: @$(NORMAL_UNINSTALL) @list='$(Applications_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(Applicationsdir)/$$f'"; \ rm -f "$(DESTDIR)$(Applicationsdir)/$$f"; \ done install-GladeDATA: $(Glade_DATA) @$(NORMAL_INSTALL) test -z "$(Gladedir)" || $(MKDIR_P) "$(DESTDIR)$(Gladedir)" @list='$(Glade_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(GladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Gladedir)/$$f'"; \ $(GladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Gladedir)/$$f"; \ done uninstall-GladeDATA: @$(NORMAL_UNINSTALL) @list='$(Glade_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(Gladedir)/$$f'"; \ rm -f "$(DESTDIR)$(Gladedir)/$$f"; \ done install-GladesaneDATA: $(Gladesane_DATA) @$(NORMAL_INSTALL) test -z "$(Gladesanedir)" || $(MKDIR_P) "$(DESTDIR)$(Gladesanedir)" @list='$(Gladesane_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(GladesaneDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Gladesanedir)/$$f'"; \ $(GladesaneDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Gladesanedir)/$$f"; \ done uninstall-GladesaneDATA: @$(NORMAL_UNINSTALL) @list='$(Gladesane_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(Gladesanedir)/$$f'"; \ rm -f "$(DESTDIR)$(Gladesanedir)/$$f"; \ done install-MoheDATA: $(Mohe_DATA) @$(NORMAL_INSTALL) test -z "$(Mohedir)" || $(MKDIR_P) "$(DESTDIR)$(Mohedir)" @list='$(Mohe_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(MoheDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Mohedir)/$$f'"; \ $(MoheDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Mohedir)/$$f"; \ done uninstall-MoheDATA: @$(NORMAL_UNINSTALL) @list='$(Mohe_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(Mohedir)/$$f'"; \ rm -f "$(DESTDIR)$(Mohedir)/$$f"; \ done install-MosvDATA: $(Mosv_DATA) @$(NORMAL_INSTALL) test -z "$(Mosvdir)" || $(MKDIR_P) "$(DESTDIR)$(Mosvdir)" @list='$(Mosv_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(MosvDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Mosvdir)/$$f'"; \ $(MosvDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Mosvdir)/$$f"; \ done uninstall-MosvDATA: @$(NORMAL_UNINSTALL) @list='$(Mosv_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(Mosvdir)/$$f'"; \ rm -f "$(DESTDIR)$(Mosvdir)/$$f"; \ done install-PixmapssDATA: $(Pixmapss_DATA) @$(NORMAL_INSTALL) test -z "$(Pixmapssdir)" || $(MKDIR_P) "$(DESTDIR)$(Pixmapssdir)" @list='$(Pixmapss_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(PixmapssDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Pixmapssdir)/$$f'"; \ $(PixmapssDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Pixmapssdir)/$$f"; \ done uninstall-PixmapssDATA: @$(NORMAL_UNINSTALL) @list='$(Pixmapss_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(Pixmapssdir)/$$f'"; \ rm -f "$(DESTDIR)$(Pixmapssdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(Applicationsdir)" "$(DESTDIR)$(Gladedir)" "$(DESTDIR)$(Gladesanedir)" "$(DESTDIR)$(Mohedir)" "$(DESTDIR)$(Mosvdir)" "$(DESTDIR)$(Pixmapssdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-ApplicationsDATA install-GladeDATA \ install-GladesaneDATA install-MoheDATA install-MosvDATA \ install-PixmapssDATA install-dvi: install-dvi-am install-exec-am: install-binSCRIPTS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-ApplicationsDATA uninstall-GladeDATA \ uninstall-GladesaneDATA uninstall-MoheDATA uninstall-MosvDATA \ uninstall-PixmapssDATA uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install \ install-ApplicationsDATA install-GladeDATA \ install-GladesaneDATA install-MoheDATA install-MosvDATA \ install-PixmapssDATA install-am install-binSCRIPTS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall \ uninstall-ApplicationsDATA uninstall-GladeDATA \ uninstall-GladesaneDATA uninstall-MoheDATA uninstall-MosvDATA \ uninstall-PixmapssDATA uninstall-am uninstall-binSCRIPTS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/examples/hocr-gtk/he_sane-pygtk.po0000644000175000017500000000556411035627172016673 00000000000000# Hebrew translations for libhocr package. # Copyright (C) 2008 THE libhocr'S COPYRIGHT HOLDER # This file is distributed under the same license as the libhocr package. # kobi , 2008. # msgid "" msgstr "" "Project-Id-Version: libhocr 0.10.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-05-11 08:22+0300\n" "PO-Revision-Date: 2008-05-11 08:22+0300\n" "Last-Translator: kobi \n" "Language-Team: Hebrew\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: sane-pygtk:80 msgid "" "Can't load sane-pygtk's glade GUI file, check your install.\n" "Exit program." msgstr "" "לא מצליח לקרוא את קובץ ה glade של sane-pygtk, בדוק את ההתקנה.\n" "יוצא מהתכנית." #: sane-pygtk:273 #, python-format msgid "" "Can't scan preview image,\n" "%s,\n" "Check scanner settings" msgstr "" "לא מצליח לסרוק תמונה מקדימה\n" "%s,\n" "בדקו את הגדרות הסריקה" #: sane-pygtk:321 #, python-format msgid "" "Can't scan,\n" "%s,\n" "Check scanner settings" msgstr "" "לא מצליח לסרוק,\n" "%s,\n" "בדקו את הגדרות הסריקה" #: sane-pygtk.glade.h:1 msgid "(0,0) - (100,100)" msgstr "" #: sane-pygtk.glade.h:2 msgid "Brightness:" msgstr "בהירות" #: sane-pygtk.glade.h:3 msgid "Contrast:" msgstr "ניגודיות" #: sane-pygtk.glade.h:4 msgid "Mode:" msgstr "מצב" #: sane-pygtk.glade.h:5 msgid "Preview" msgstr "תמונה מקדימה" #: sane-pygtk.glade.h:6 msgid "Reset" msgstr "אתחל" #: sane-pygtk.glade.h:7 msgid "Resolution:" msgstr "הפרדה" #: sane-pygtk.glade.h:8 msgid "Save as:" msgstr "שמור בשם" #: sane-pygtk.glade.h:9 msgid "Scan" msgstr "סרוק" #: sane-pygtk.glade.h:10 msgid "Scanner:" msgstr "סורק" #: sane-pygtk.glade.h:11 msgid "Settings" msgstr "הגדרות" #: sane-pygtk.glade.h:12 msgid "Update preview" msgstr "עדכן" #: sane-pygtk.glade.h:13 msgid "Window:" msgstr "חלון" #: sane-pygtk.glade.h:14 msgid "_Edit" msgstr "עריכה" #: sane-pygtk.glade.h:15 msgid "_File" msgstr "קובץ" #: sane-pygtk.glade.h:16 msgid "_Help" msgstr "עזרה" #: sane-pygtk.glade.h:17 msgid "_Preview" msgstr "תצוגה מקדימה" #: sane-pygtk.glade.h:18 msgid "_Reset settings to defaults" msgstr "אתחל" #: sane-pygtk.glade.h:19 msgid "_Save current settings as defaults" msgstr "שמור מצב נוכחי כברירת מחדל" #: sane-pygtk.glade.h:20 msgid "_Scan" msgstr "סרוק" #: sane-pygtk.glade.h:21 msgid "_View" msgstr "תצוגה" #: sane-pygtk.glade.h:22 msgid "gtk-about" msgstr "" #: sane-pygtk.glade.h:23 msgid "gtk-quit" msgstr "" #: sane-pygtk.glade.h:24 msgid "gtk-zoom-100" msgstr "" #: sane-pygtk.glade.h:25 msgid "gtk-zoom-in" msgstr "" #: sane-pygtk.glade.h:26 msgid "gtk-zoom-out" msgstr "" libhocr-0.10.17/examples/hocr-gtk/sv_hocr-gtk.po0000644000175000017500000001265411044145650016355 00000000000000# Swedish translation of hocr-gtk. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the hocr package. # Daniel Nylander , 2006. # msgid "" msgstr "" "Project-Id-Version: libhocr 0.10.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-07-30 23:14+0300\n" "PO-Revision-Date: 2008-05-11 08:22+0300\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: hocr-gtk:78 msgid "" "Hocr-GTK, Hebrew optical character recognition\n" "graphical front end (GTK)\n" "\n" msgstr "" #: hocr-gtk:80 msgid "Shlomi Israel " msgstr "" #: hocr-gtk:81 msgid "Yaacov Zamir " msgstr "" #: hocr-gtk:186 msgid "Image Processing..." msgstr "" #: hocr-gtk:199 msgid "Layout Analysis..." msgstr "" #: hocr-gtk:202 msgid "Font Recognition..." msgstr "" #: hocr-gtk:261 hocr-gtk:359 msgid "Processing..." msgstr "" #: hocr-gtk:455 msgid "" "Can't load hocr's glade GUI file, check your install.\n" "Exit program." msgstr "" #: hocr-gtk:748 msgid "Open.." msgstr "" #: hocr-gtk:776 hocr-gtk:797 msgid "Closed, no files selected" msgstr "" #: hocr-gtk:784 msgid "Save.." msgstr "" #: hocr-gtk:973 msgid "Closed, no files scaned" msgstr "" #: hocr-gtk:1118 msgid "translator-credits" msgstr "Daniel Nylander " #: hocr-gtk:1129 msgid "Set text font" msgstr "" #: hocr-gtk.glade.h:1 msgid "1" msgstr "" #: hocr-gtk.glade.h:2 msgid "2" msgstr "" #: hocr-gtk.glade.h:3 msgid "3" msgstr "" #: hocr-gtk.glade.h:4 msgid "4" msgstr "" #: hocr-gtk.glade.h:5 msgid "Black and White" msgstr "" #: hocr-gtk.glade.h:6 msgid "Direction" msgstr "" #: hocr-gtk.glade.h:7 msgid "Engine" msgstr "" #: hocr-gtk.glade.h:8 msgid "Font" msgstr "" #: hocr-gtk.glade.h:9 msgid "Font 1" msgstr "" #: hocr-gtk.glade.h:10 msgid "Font 2" msgstr "" #: hocr-gtk.glade.h:11 msgid "Font 3" msgstr "" #: hocr-gtk.glade.h:12 msgid "Font 4" msgstr "" #: hocr-gtk.glade.h:13 msgid "Font 5" msgstr "" #: hocr-gtk.glade.h:14 msgid "Font 6" msgstr "" #: hocr-gtk.glade.h:15 msgid "Font splicing" msgstr "" #: hocr-gtk.glade.h:16 msgid "Hocr" msgstr "" #: hocr-gtk.glade.h:17 msgid "Image" msgstr "" #: hocr-gtk.glade.h:18 msgid "Image processing" msgstr "" #: hocr-gtk.glade.h:19 msgid "LTR" msgstr "" #: hocr-gtk.glade.h:20 msgid "Layout" msgstr "" #: hocr-gtk.glade.h:21 msgid "Line leeway" msgstr "" #: hocr-gtk.glade.h:22 msgid "Linguistics" msgstr "" #: hocr-gtk.glade.h:23 msgid "Ocrad" msgstr "" #: hocr-gtk.glade.h:24 msgid "Original" msgstr "" #: hocr-gtk.glade.h:25 msgid "RTL" msgstr "" #: hocr-gtk.glade.h:26 msgid "Scale" msgstr "" #: hocr-gtk.glade.h:27 msgid "Scan" msgstr "" #: hocr-gtk.glade.h:28 msgid "Tesseract" msgstr "" #: hocr-gtk.glade.h:29 msgid "Threshold" msgstr "" #: hocr-gtk.glade.h:30 msgid "Threshold type" msgstr "" #: hocr-gtk.glade.h:31 msgid "Word spacing" msgstr "" #: hocr-gtk.glade.h:32 msgid "_Edit" msgstr "_Redigera" #: hocr-gtk.glade.h:33 msgid "_File" msgstr "_Arkiv" #: hocr-gtk.glade.h:34 msgid "_Help" msgstr "_Hjälp" #: hocr-gtk.glade.h:35 msgid "_View" msgstr "_Visa" #: hocr-gtk.glade.h:36 msgid "adaptive" msgstr "" #: hocr-gtk.glade.h:37 msgid "agresive" msgstr "" #: hocr-gtk.glade.h:38 msgid "auto" msgstr "" #: hocr-gtk.glade.h:39 msgid "auto rotate" msgstr "" #: hocr-gtk.glade.h:40 msgid "big" msgstr "" #: hocr-gtk.glade.h:41 msgid "careful" msgstr "" #: hocr-gtk.glade.h:42 msgid "clear" msgstr "Töm" #: hocr-gtk.glade.h:43 msgid "closing" msgstr "" #: hocr-gtk.glade.h:44 msgid "column" msgstr "" #: hocr-gtk.glade.h:45 msgid "dark" msgstr "" #: hocr-gtk.glade.h:46 msgid "dilation" msgstr "" #: hocr-gtk.glade.h:47 msgid "erosion" msgstr "" #: hocr-gtk.glade.h:48 msgid "fine" msgstr "" #: hocr-gtk.glade.h:49 msgid "free" msgstr "" #: hocr-gtk.glade.h:50 msgid "gtk-about" msgstr "" #: hocr-gtk.glade.h:51 msgid "gtk-apply" msgstr "" #: hocr-gtk.glade.h:52 msgid "gtk-copy" msgstr "" #: hocr-gtk.glade.h:53 msgid "gtk-cut" msgstr "" #: hocr-gtk.glade.h:54 msgid "gtk-delete" msgstr "" #: hocr-gtk.glade.h:55 msgid "gtk-new" msgstr "" #: hocr-gtk.glade.h:56 msgid "gtk-paste" msgstr "" #: hocr-gtk.glade.h:57 msgid "gtk-quit" msgstr "" #: hocr-gtk.glade.h:58 msgid "gtk-revert-to-saved" msgstr "" #: hocr-gtk.glade.h:59 msgid "gtk-save" msgstr "" #: hocr-gtk.glade.h:60 msgid "gtk-select-font" msgstr "" #: hocr-gtk.glade.h:61 msgid "gtk-zoom-100" msgstr "" #: hocr-gtk.glade.h:62 msgid "gtk-zoom-fit" msgstr "" #: hocr-gtk.glade.h:63 msgid "gtk-zoom-in" msgstr "" #: hocr-gtk.glade.h:64 msgid "gtk-zoom-out" msgstr "" #: hocr-gtk.glade.h:65 msgid "html" msgstr "" #: hocr-gtk.glade.h:66 msgid "light" msgstr "" #: hocr-gtk.glade.h:67 msgid "nikud" msgstr "" #: hocr-gtk.glade.h:68 msgid "normal" msgstr "" #: hocr-gtk.glade.h:69 msgid "one column" msgstr "" #: hocr-gtk.glade.h:70 msgid "opening" msgstr "" #: hocr-gtk.glade.h:71 msgid "regular" msgstr "" #: hocr-gtk.glade.h:72 msgid "small" msgstr "" #: hocr-gtk.glade.h:73 msgid "spaced" msgstr "" #: hocr-gtk.glade.h:74 msgid "tight" msgstr "" #: hocr-gtk.glade.h:75 msgid "very dark" msgstr "" #: hocr-gtk.glade.h:76 msgid "very light" msgstr "" #: hocr-gtk.glade.h:77 msgid "very spaced" msgstr "" #: hocr-gtk.glade.h:78 msgid "very tight" msgstr "" libhocr-0.10.17/examples/hocr-gtk/sane-pygtk.pot0000644000175000017500000000442711044146243016373 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-07-30 23:18+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: sane-pygtk:80 msgid "" "Can't load sane-pygtk's glade GUI file, check your install.\n" "Exit program." msgstr "" #: sane-pygtk:273 #, python-format msgid "" "Can't scan preview image,\n" "%s,\n" "Check scanner settings" msgstr "" #: sane-pygtk:321 #, python-format msgid "" "Can't scan,\n" "%s,\n" "Check scanner settings" msgstr "" #: sane-pygtk.glade.h:1 msgid "(0,0) - (100,100)" msgstr "" #: sane-pygtk.glade.h:2 msgid "Brightness:" msgstr "" #: sane-pygtk.glade.h:3 msgid "Contrast:" msgstr "" #: sane-pygtk.glade.h:4 msgid "Mode:" msgstr "" #: sane-pygtk.glade.h:5 msgid "Preview" msgstr "" #: sane-pygtk.glade.h:6 msgid "Reset" msgstr "" #: sane-pygtk.glade.h:7 msgid "Resolution:" msgstr "" #: sane-pygtk.glade.h:8 msgid "Save as:" msgstr "" #: sane-pygtk.glade.h:9 msgid "Scan" msgstr "" #: sane-pygtk.glade.h:10 msgid "Scanner:" msgstr "" #: sane-pygtk.glade.h:11 msgid "Settings" msgstr "" #: sane-pygtk.glade.h:12 msgid "Update preview" msgstr "" #: sane-pygtk.glade.h:13 msgid "Window:" msgstr "" #: sane-pygtk.glade.h:14 msgid "_Edit" msgstr "" #: sane-pygtk.glade.h:15 msgid "_File" msgstr "" #: sane-pygtk.glade.h:16 msgid "_Help" msgstr "" #: sane-pygtk.glade.h:17 msgid "_Preview" msgstr "" #: sane-pygtk.glade.h:18 msgid "_Reset settings to defaults" msgstr "" #: sane-pygtk.glade.h:19 msgid "_Save current settings as defaults" msgstr "" #: sane-pygtk.glade.h:20 msgid "_Scan" msgstr "" #: sane-pygtk.glade.h:21 msgid "_View" msgstr "" #: sane-pygtk.glade.h:22 msgid "gtk-about" msgstr "" #: sane-pygtk.glade.h:23 msgid "gtk-quit" msgstr "" #: sane-pygtk.glade.h:24 msgid "gtk-zoom-100" msgstr "" #: sane-pygtk.glade.h:25 msgid "gtk-zoom-in" msgstr "" #: sane-pygtk.glade.h:26 msgid "gtk-zoom-out" msgstr "" libhocr-0.10.17/examples/hocr-gtk/sane-pygtk0000755000175000017500000006455411017002616015577 00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Generated with glade2py script # glade2py script can be found at hocr web site http://hocr.berlios.de # Copyright (C) 2008 Yaacov Zamir import pygtk pygtk.require('2.0') import gtk, gtk.glade import getopt, sys, os import types, ConfigParser import sane # set global parmeters app_name = "sane-pygtk" app_version = "0.1.1" author_name = "Yaacov Zamir" author_email = "" home_page = "http://sane-pygtk.sourceforge.net" copyright = author_name + " " + author_email comments = "SANE (Scanner Access Now Easy)\npygtk frontend" # set gettext support locale_dir = '/usr/share/locale' try: import locale import gettext locale.setlocale(locale.LC_ALL, "") gtk.glade.bindtextdomain(app_name, locale_dir) gettext.install(app_name, locale_dir, unicode=1) except (IOError,locale.Error), e: print "WARNING: Can't load locale" _ = lambda x : x # set global functions def get_scanner_option (scanner, name): options = scanner.get_options() for option in options: if option[1] == name: return option return False def show_error_message(message): dlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR ,message_format = message ,buttons=gtk.BUTTONS_OK) dlg.run() dlg.destroy() class MainWindow: def __init__(self): # create widget tree ... xml = False if os.path.isfile('sane-pygtk.glade'): xml = gtk.glade.XML('sane-pygtk.glade', 'window1', app_name) else: if os.path.isfile(sys.prefix + '/share/sane-pygtk/glade/sane-pygtk.glade'): xml = gtk.glade.XML(sys.prefix + '/share/sane-pygtk/glade/sane-pygtk.glade', 'window1', app_name) if not xml: print "ERROR: Can't load glade GUI file, check your install." show_error_message(_("Can't load sane-pygtk's glade GUI file, check your install.\nExit program.")) sys.exit(0) # if user want to scan to one file exit after scan self.exit_after_scan = False # create config object with default values self.config = ConfigParser.ConfigParser() self.config.add_section('settings') self.config.set('settings', 'scanner', '1') self.config.set('settings', 'mode', '0') self.config.set('settings', 'resolution', '300') self.config.set('settings', 'brightness', '0') self.config.set('settings', 'contrast', '0') self.config.add_section('window') self.config.set('window', 'tl_x', '0') self.config.set('window', 'tl_y', '0') self.config.set('window', 'br_x', '215') self.config.set('window', 'br_y', '297') self.config.set('window', 'width', '215') self.config.set('window', 'height', '297') self.config.add_section('zoom') self.config.set('zoom', 'factor', '1') self.config.set('zoom', 'preview_width', '423') self.config.set('zoom', 'preview_height', '584') self.config.set('zoom', 'x1', '0') self.config.set('zoom', 'y1', '0') self.config.set('zoom', 'x2', '423') self.config.set('zoom', 'y2', '584') self.config.add_section('scan') self.config.set('scan', 'filename', 'scan_1.png') self.config.add_section('defaults') self.config.set('defaults', 'mode', '0') self.config.set('defaults', 'resolution', '300') self.config.set('defaults', 'brightness', '0') self.config.set('defaults', 'contrast', '0') # read config file and overwrite default values self.config.read([os.path.expanduser('~/.sane-pygtk.cfg')]) # connect handlers xml.signal_autoconnect(self) # widgets self.window1 = xml.get_widget('window1') self.label_window = xml.get_widget('label_window') self.menuitem_help = xml.get_widget('menuitem_help') self.spinbutton_contrast = xml.get_widget('spinbutton_contrast') self.spinbutton_brightness = xml.get_widget('spinbutton_brightness') self.spinbutton_resolution = xml.get_widget('spinbutton_resolution') self.combobox_mode = xml.get_widget('combobox_mode') self.combobox_scanner = xml.get_widget('combobox_scanner') self.label_filename = xml.get_widget('label_filename') self.entry_filename = xml.get_widget('entry_filename') self.drawingarea1 = xml.get_widget('drawingarea1') # the pixmap and preview pixmap self.pixmap = None self.preview_pixmap = None # update scan window self.x1 = self.config.getfloat('zoom', 'x1') self.y1 = self.config.getfloat('zoom', 'y1') self.x2 = self.config.getfloat('zoom', 'x2') self.y2 = self.config.getfloat('zoom', 'y2') self.width = self.x2 - self.x1 self.height = self.y2 - self.y1 # get scanners in system self.sane_devices = sane.get_devices() self.sane_devices_counter = len(self.sane_devices) # set the scanners combobox for device in self.sane_devices: self.combobox_scanner.append_text(device[2]) # get the current scanner scanner_number = self.config.getint('settings', 'scanner') - 1 self.combobox_scanner.set_active(scanner_number) # if scanner exist the auto call to combobox_scanner_changed will fill in all the settings # fill in resolution, brightness and contrast self.spinbutton_resolution.set_value(self.config.getfloat('settings', 'resolution')) self.spinbutton_brightness.set_value(self.config.getfloat('settings', 'brightness')) self.spinbutton_contrast.set_value(self.config.getfloat('settings', 'contrast')) # fill in file name filename = self.config.get('scan', 'filename') self.entry_filename.set_text(filename) # signal handlers def on_window1_delete_event(self, widget, obj): "on_window1_delete_event activated" # write config file print (self.config.getfloat('settings', 'resolution')) print (self.config.getfloat('settings', 'brightness')) print (self.config.getfloat('settings', 'contrast')) self.config.write(open(os.path.expanduser('~/.sane-pygtk.cfg'), 'wb')) gtk.main_quit() def imagemenuitem_quit_activate_cb(self, obj): "imagemenuitem_quit_activate_cb activated" self.config.write(open(os.path.expanduser('~/.sane-pygtk.cfg'), 'wb')) gtk.main_quit() def button_quit_clicked_cb(self, obj): "button_quit_clicked_cb activated" self.config.write(open(os.path.expanduser('~/.sane-pygtk.cfg'), 'wb')) gtk.main_quit() def imagemenuitem_about_activate_cb(self, obj): "imagemenuitem_about_activate_cb activated" dialog = gtk.AboutDialog() dialog.set_name(app_name) dialog.set_version(app_version) dialog.set_copyright(copyright) dialog.set_comments(comments) dialog.run() dialog.destroy() def button_preview_clicked_cb(self, obj): "button_preview_clicked_cb activated" # open scanner scanner_number = self.config.getint('settings', 'scanner') - 1 scanner = sane.open(self.sane_devices[scanner_number][0]) # options options = get_scanner_option (scanner, 'mode') if options: scanner.mode = options[8][self.combobox_mode.get_active()] options = get_scanner_option (scanner, 'resolution') if options: try: scanner.resolution = int(options[8][0]) except AttributeError: print "WARNING: Can't set scan resolution" try: scanner.brightness = int(self.spinbutton_brightness.get_value()) except AttributeError: print "WARNING: Can't set scan brightness" try: scanner.contrast = int(self.spinbutton_contrast.get_value()) except AttributeError: print "WARNING: Can't set scan contrast" try: scanner.preview = 1 except AttributeError: print "WARNING: Can't set scan preview" # geometry try: scanner.tl_x = 0 scanner.tl_y = 0 options = get_scanner_option (scanner, 'br-x') scanner.br_x = options[8][1] options = get_scanner_option (scanner, 'br-y') scanner.br_y = options[8][1] except AttributeError: print "WARNING: Can't set scan geometry" #scan try: pil_image = scanner.scan() w, h = pil_image.size data = pil_image.tostring() if pil_image.mode == 'L': rgb_data = '' for c in data: rgb_data += c + c + c data = rgb_data if pil_image.mode == 'RGB' or pil_image.mode == 'L': self.pixmap = gtk.gdk.pixbuf_new_from_data(data, gtk.gdk.COLORSPACE_RGB, False, 8, w, h, w * 3) self.config.set('zoom', 'preview_width', str(w)) self.config.set('zoom', 'preview_height', str(h)) factor = self.config.getfloat('zoom', 'factor') self.preview_pixmap = self.pixmap.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.drawingarea1.queue_draw() except sane._sane.error, err: print "ERROR: Can't scan" show_error_message(_("Can't scan preview image,\n%s,\nCheck scanner settings") % err) # close scanner scanner.close() def button_scan_clicked_cb(self, obj): "button_scan_clicked_cb activated" # open scanner scanner_number = self.config.getint('settings', 'scanner') - 1 scanner = sane.open(self.sane_devices[scanner_number][0]) # options options = get_scanner_option (scanner, 'mode') if options: scanner.mode = options[8][self.combobox_mode.get_active()] try: scanner.resolution = int(self.spinbutton_resolution.get_value()) except AttributeError: print "WARNING: Can't set scan resolution" try: scanner.brightness = int(self.spinbutton_brightness.get_value()) except AttributeError: print "WARNING: Can't set scan brightness" try: scanner.contrast = int(self.spinbutton_contrast.get_value()) except AttributeError: print "WARNING: Can't set scan contrast" try: scanner.preview = 0 except AttributeError: print "WARNING: Can't set scan preview" # geometry try: scanner.tl_x = self.config.getfloat('window', 'tl_x') scanner.tl_y = self.config.getfloat('window', 'tl_y') scanner.br_x = self.config.getfloat('window', 'br_x') scanner.br_y = self.config.getfloat('window', 'br_y') except AttributeError: print "WARNING: Can't set scan geometry" #scan try: pil_image = scanner.scan() pil_image.save(self.entry_filename.get_text()) except sane._sane.error, err: print "ERROR: Can't scan" show_error_message(_("Can't scan,\n%s,\nCheck scanner settings") % err) # close scanner scanner.close() # exit program if self.exit_after_scan: # write config file self.config.write(open(os.path.expanduser('~/.hocr-sane.cfg'), 'wb')) sys.exit(99) def imagemenuitem_zoom_in_activate_cb(self, obj): "imagemenuitem_zoom_in_activate_cb activated" factor = self.config.getfloat('zoom', 'factor') factor = factor * 1.2 self.config.set('zoom', 'factor', str(factor)) w, h = self.pixmap.get_width(), self.pixmap.get_height() self.preview_pixmap = self.pixmap.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.x1 = self.x1 * 1.2 self.y1 = self.y1 * 1.2 self.x2 = self.x2 * 1.2 self.y2 = self.y2 * 1.2 self.config.set('zoom', 'x1', str(self.x1)) self.config.set('zoom', 'y1', str(self.y1)) self.config.set('zoom', 'x2', str(self.x2)) self.config.set('zoom', 'y2', str(self.y2)) self.drawingarea1.queue_draw() def imagemenuitem_zoom_out_activate_cb(self, obj): "imagemenuitem_zoom_out_activate_cb activated" factor = self.config.getfloat('zoom', 'factor') factor = factor / 1.2 self.config.set('zoom', 'factor', str(factor)) w, h = self.pixmap.get_width(), self.pixmap.get_height() self.preview_pixmap = self.pixmap.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.x1 = self.x1 / 1.2 self.y1 = self.y1 / 1.2 self.x2 = self.x2 / 1.2 self.y2 = self.y2 / 1.2 self.config.set('zoom', 'x1', str(self.x1)) self.config.set('zoom', 'y1', str(self.y1)) self.config.set('zoom', 'x2', str(self.x2)) self.config.set('zoom', 'y2', str(self.y2)) self.drawingarea1.queue_draw() def imagemenuitem_normal_size_activate_cb(self, obj): "imagemenuitem_normal_size_activate_cb activated" factor = self.config.getfloat('zoom', 'factor') self.x1 = self.x1 / factor self.y1 = self.y1 / factor self.x2 = self.x2 / factor self.y2 = self.y2 / factor self.config.set('zoom', 'x1', str(self.x1)) self.config.set('zoom', 'y1', str(self.y1)) self.config.set('zoom', 'x2', str(self.x2)) self.config.set('zoom', 'y2', str(self.y2)) factor = 1 self.config.set('zoom', 'factor', str(factor)) w, h = self.pixmap.get_width(), self.pixmap.get_height() self.preview_pixmap = self.pixmap.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.drawingarea1.queue_draw() def button_reset_clicked_cb(self, obj): "button_reset_clicked_cb activated" # set values setting = self.config.getfloat('defaults', 'mode') self.combobox_mode.set_active(int(setting)) setting = self.config.getfloat('defaults', 'resolution') self.spinbutton_resolution.set_value(setting) setting = self.config.getfloat('defaults', 'brightness') self.spinbutton_brightness.set_value(setting) setting = self.config.getfloat('defaults', 'contrast') self.spinbutton_contrast.set_value(setting) def drawingarea1_expose_event_cb(self, obj, event): "drawingarea1_expose_event_cb activated" # draw preview gc = obj.style.fg_gc[gtk.STATE_NORMAL] obj.window.draw_pixbuf(gc, self.preview_pixmap, 0, 0, 0, 0) if abs(self.x1 - self.x2) < 10 and abs(self.y1 - self.y2) < 10: x, y, width, height = 0, 0, self.preview_pixmap.get_width(), self.pixmap.get_height() else: if self.x1 > self.x2: x = self.x2 width = self.x1 - x else: x = self.x1 width = self.x2 - x if self.y1 > self.y2: y = self.y2 height = self.y1 - y else: y = self.y1 height = self.y2 - y # check validity if x < 0: x = 0 if y < 0: y = 0 if (x + width) >= self.preview_pixmap.get_width(): width = self.preview_pixmap.get_width() - x - 1 if (y + height) >= self.preview_pixmap.get_height(): height = self.preview_pixmap.get_height() - y - 1 rect = (int(x), int(y), int(width), int(height)) # draw rect obj.window.draw_rectangle(obj.get_style().black_gc, False, rect[0], rect[1], rect[2], rect[3]) obj.window.draw_rectangle(obj.get_style().white_gc, False, rect[0] + 1, rect[1] + 1, rect[2] - 2, rect[3] - 2) # get scanner dimentions factor = self.config.getfloat('zoom', 'factor') w = self.config.getfloat('zoom', 'preview_width') h = self.config.getfloat('zoom', 'preview_height') page_width = self.config.getfloat('window', 'width') page_height = self.config.getfloat('window', 'height') x1 = page_width * x / (factor * w) x2 = page_width * (x + width) / (factor * w) y1 = page_height * y / (factor * h) y2 = page_height * (y + height) / (factor * h) # update window lable self.label_window.set_text ("%d,%d : %d,%d" % (x1, y1, x2, y2)) # update config self.config.set('window', 'tl_x', str(x1)) self.config.set('window', 'tl_y', str(y1)) self.config.set('window', 'br_x', str(x2)) self.config.set('window', 'br_y', str(y2)) width, height = self.preview_pixmap.get_width(), self.preview_pixmap.get_height() obj.set_size_request(width, height) return False def drawingarea1_configure_event_cb(self, obj, event): "drawingarea1_configure_event_cb activated" # if no pixmap create one if not self.pixmap: factor = self.config.getfloat('zoom', 'factor') w = self.config.getfloat('zoom', 'preview_width') h = self.config.getfloat('zoom', 'preview_height') self.pixmap = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, int(w), int(h)) self.preview_pixmap = self.pixmap.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) return True def drawingarea1_button_press_event_cb(self, obj, event): "drawingarea1_button_press_event_cb activated" if event.button == 1 and self.pixmap != None: self.x1, self.y1 = event.x, event.y self.config.set('zoom', 'x1', str(self.x1)) self.config.set('zoom', 'y1', str(self.y1)) return True def drawingarea1_motion_notify_event_cb(self, obj, event): "drawingarea1_motion_notify_event_cb activated" if event.is_hint: x, y, state = event.window.get_pointer() else: x = event.x y = event.y state = event.state if state & gtk.gdk.BUTTON1_MASK and self.pixmap != None: self.x2, self.y2 = x, y self.config.set('zoom', 'x2', str(self.x2)) self.config.set('zoom', 'y2', str(self.y2)) obj.queue_draw() return True def drawingarea1_scroll_event_cb(self, obj, event): "drawingarea1_scroll_event_cb activated" if event.direction == gtk.gdk.SCROLL_UP: self.imagemenuitem_zoom_out_activate_cb(None) else: self.imagemenuitem_zoom_in_activate_cb(None) return False def combobox_scanner_changed_cb(self, obj): "combobox_scanner_changed_cb activated" # set config scanner_number = obj.get_active() self.config.set('settings', 'scanner', str(scanner_number + 1)) # reset settings options if scanner_number < len(self.sane_devices): try: scanner = sane.open(self.sane_devices[scanner_number][0]) # if scanner exist fill in all the settings # mode options = get_scanner_option (scanner, 'mode') i = 0 # clear mode combobox model = self.combobox_mode.get_model() self.combobox_mode.set_model(None) model.clear() # add new entreis for mode in options[8]: model.append([mode]) self.combobox_mode.set_model(model) mode_number = self.config.getfloat('settings', 'mode') self.combobox_mode.set_active(int(mode_number)) # resolution options = get_scanner_option (scanner, 'resolution') if options: if type(options[8]) == types.ListType: self.spinbutton_resolution.set_range(options[8][0], options[8][-1]) else: self.spinbutton_resolution.set_range(options[8][0], options[8][1]) # brightness options = get_scanner_option (scanner, 'brightness') if options: if type(options[8]) == types.ListType: self.spinbutton_brightness.set_range(options[8][0], options[8][-1]) else: self.spinbutton_brightness.set_range(options[8][0], options[8][1]) # contrast options = get_scanner_option (scanner, 'contrast') if options: if type(options[8]) == types.ListType: self.spinbutton_contrast.set_range(options[8][0], options[8][-1]) else: self.spinbutton_contrast.set_range(options[8][0], options[8][1]) # scan window dimentions options = get_scanner_option (scanner, 'br-x') self.config.set('window', 'width', str(options[8][1])) options = get_scanner_option (scanner, 'br-y') self.config.set('window', 'height', str(options[8][1])) scanner.close() # set values setting = self.config.getfloat('settings', 'mode') self.combobox_mode.set_active(int(setting)) setting = self.config.getfloat('settings', 'resolution') self.spinbutton_resolution.set_value(setting) setting = self.config.getfloat('settings', 'brightness') self.spinbutton_brightness.set_value(setting) setting = self.config.getfloat('settings', 'contrast') self.spinbutton_contrast.set_value(setting) except RuntimeError: print "WARNING: Can't open scanner" else: print "WARNING: Scanner number is out of range" def combobox_mode_changed_cb(self, obj): "combobox_mode_changed_cb activated" mode_number = obj.get_active() self.config.set('settings', 'mode', str(mode_number)) def spinbutton_contrast_changed_cb(self, obj, val = None): "spinbutton_contrast_changed_cb activated" contrast = obj.get_value() self.config.set('settings', 'contrast', str(contrast)) def spinbutton_brightness_changed_cb(self, obj, val = None): "spinbutton_brightness_changed_cb activated" brightness = obj.get_value() self.config.set('settings', 'brightness', str(brightness)) def spinbutton_resolution_changed_cb(self, obj, val = None): "spinbutton_resolution_changed_cb activated" resolution = obj.get_value() self.config.set('settings', 'resolution', str(resolution)) def entry_filename_changed_cb(self, obj): "entry_filename_changed_cb activated" filename = obj.get_text() self.config.set('settings', 'filename', filename) def imagemenuitem_reset_activate_cb(self, obj): "imagemenuitem_reset_activate_cb activated" self.button_reset_clicked_cb(None) def imagemenuitem_scan_activate_cb(self, obj): "imagemenuitem_scan_activate_cb activated" self.button_scan_clicked_cb(None) def imagemenuitem_preview_activate_cb(self, obj): "imagemenuitem_scan_activate_cb activated" self.button_preview_clicked_cb(None) def imagemenuitem_save_defaults_activate_cb(self, obj): "imagemenuitem_save_defaults_activate_cb activated" # set values setting = self.combobox_mode.get_active() self.config.set('defaults', 'mode', str(setting)) setting = self.spinbutton_resolution.get_value() self.config.set('defaults', 'resolution', str(setting)) setting = self.spinbutton_brightness.get_value() self.config.set('defaults', 'brightness', str(setting)) setting = self.spinbutton_contrast.get_value() self.config.set('defaults', 'contrast', str(setting)) # main window is global main_window = None # run main loop def main(): global main_window # init sane sane_version = sane.init() # init gui main_window = MainWindow() # if usage is not currect if len(sys.argv) != 1 and len(sys.argv) != 3: print 'usage: hocr-sane.py [--file IMAGE_OUT_FILENAME]' sys.exit(1) if len(sys.argv) == 3 and not (sys.argv[1] == '-f' or sys.argv[1] == '--file'): print 'usage: hocr-sane.py [--file IMAGE_OUT_FILENAME]' sys.exit(1) # if this is a scan-window for other program if len(sys.argv) == 3 and (sys.argv[1] == '-f' or sys.argv[1] == '--file'): # hide filename edit box main_window.label_filename.hide() main_window.entry_filename.hide() # hide about window main_window.menuitem_help.hide() # set the temporary file name main_window.entry_filename.set_text(sys.argv[2]) main_window.exit_after_scan = True # run main_window.window1.show() gtk.main() if __name__ == "__main__": main() libhocr-0.10.17/examples/hocr-gtk/sane-pygtk.desktop0000644000175000017500000000101311051617403017225 00000000000000[Desktop Entry] Name=sane-pygtk Comment=A minimal program to work with scanner. Comment[ru]=Программа для работы со сканером. Comment[ca]=Un programa per a treballar amb escànners. Comment[es]=Un programa para trabajar con escáners.. Comment[fr]=Un programme d'acquisition d'images pour votre scanner. Comment[he]=תכנית בסיסית לשימוש בסורק. Exec=sane-pygtk Icon=sane Terminal=false Type=Application Categories=GTK;Graphics;RasterGraphics;Scanning;OCR; StartupNotify=true libhocr-0.10.17/examples/hocr-gtk/hocr-gtk.glade0000644000175000017500000020753711044126600016303 00000000000000 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _File True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-new True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-apply True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-save True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True Scan True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-quit True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Edit True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-cut True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-copy True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-paste True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-delete True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-revert-to-saved True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK clear True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK html True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK nikud True True True Linguistics True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK column True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK auto True True True True free True True menuitem_column_auto True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK one column True True menuitem_column_auto True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True auto rotate True True True Scale True True True auto True True True True 1 True True menuitem_scale_auto True 2 True True menuitem_scale_auto True 3 True menuitem_scale_auto True 4 True True menuitem_scale_auto True Image processing True True True closing True True opening True True dilation True True erosion True True Threshold type True True True regular True True True adaptive True True True menuitem_threshold_no True fine True True menuitem_threshold_no True Threshold True True True auto True True True True very light True True menuitem_threshold_v_0 True light True True menuitem_threshold_v_0 True dark True True menuitem_threshold_v_0 True very dark True True menuitem_threshold_v_0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True Font splicing True True True normal True True True True agresive True True menuitem_font_splicing_normal True careful True True menuitem_font_splicing_normal True Word spacing True True True normal True True True True very spaced True True menuitem_font_spacing_normal True spaced True True menuitem_font_spacing_normal True tight True True menuitem_font_spacing_normal True very tight True True menuitem_font_spacing_normal True Line leeway True True True small True True True True big True True menuitem_line_leeway_small True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Font True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Font 1 True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Font 2 True True menuitem_font_1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Font 3 True True menuitem_font_1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Font 4 True True menuitem_font_1 True Font 5 True True menuitem_font_1 True Font 6 True True menuitem_font_1 True True Engine True True True Hocr True True True True Ocrad True True menuitem_engine_hocr True Tesseract True True menuitem_engine_hocr True Direction True True True RTL True True True True LTR True True menuitem_dir_rtl True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _View True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-select-font True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-in True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-out True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-100 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-fit True True True True Image True True True Original True True True True Black and White True True menuitem_orig True Layout True True menuitem_orig True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Help True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-about True True False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-new False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-apply False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-save False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-in False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-out False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-100 False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-zoom-fit False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-quit False False 1 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC 400 200 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK GTK_RESIZE_QUEUE True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-missing-image False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC 200 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 250 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 1 False 3 libhocr-0.10.17/examples/hocr-gtk/hocr1-48.png0000644000175000017500000000670211017002616015531 00000000000000PNG  IHDR00WsBIT|dtEXtSoftwarewww.inkscape.org< TIDATh՚Ko\GvUun>ERe)hȎ'y982@%aY{@VY9 L3Ę'~ MJbl>}[-6)nn{uTs[cܬBp ,0LIgj S}y7]c~ !G¶mmcn$O'I DZxi !Z6\tI<3<<}|cYe!D{c,--Ad۶PJ=w~{뭷|8+WΏ9/֖;K Ns&k+.@aYޛ;iS^K!xW%CXo, WI]D9 c̉, a ֨fhdӯs%y?JL[@> !ju:Owrh/* ;g7p5666*+jqHDAt 0!-$&MhWUG(D ш~?}ey©SJbT*_in}19)mڹBy OHplu_ťe(=$ 8fuuN! 6^hjJ^P% Fc EAUGaA(<> *AkKX]]e~nZ/FkMFp~p8u]S 8뺴Z-NˡOLYJU,Ҙ[!K# R*}nE]et|_wM::?ض.lbYxgt:O^λOL[ (d9!rUeYUy;ģ#<7d:;_681~ϟ6BJ$W_eee,F!h6eg@^Wv]9i. -p\[bn|2&i̿BI㌫0c6⋼Kz=yN۝Xj!<Pv[/7ϑ-ti˯o7$шBF0` hc9_>I- … ' @k}& %upp0q2s a'5YO0iQ`D8k!କA!ęĀL^gO)ţ;~yߘr \)9;˟!a/RCtTNjƀ6ZfbJܹՋVכz7o) _6)%Ν+CoW^y۶M+><Rb bXkB 4ձ,S|#p)F !Fd[$eBsvvv˲2!Diپ/!K{gcv^~e{}}YjE e0?|7@F>" 1g(@aSD oJܩjV^U/ITFIENDB`libhocr-0.10.17/examples/hocr-gtk/hocr-gtk.pot0000644000175000017500000001243411044146243016024 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-07-30 23:18+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: hocr-gtk:78 msgid "" "Hocr-GTK, Hebrew optical character recognition\n" "graphical front end (GTK)\n" "\n" msgstr "" #: hocr-gtk:80 msgid "Shlomi Israel " msgstr "" #: hocr-gtk:81 msgid "Yaacov Zamir " msgstr "" #: hocr-gtk:186 msgid "Image Processing..." msgstr "" #: hocr-gtk:199 msgid "Layout Analysis..." msgstr "" #: hocr-gtk:202 msgid "Font Recognition..." msgstr "" #: hocr-gtk:261 hocr-gtk:359 msgid "Processing..." msgstr "" #: hocr-gtk:455 msgid "" "Can't load hocr's glade GUI file, check your install.\n" "Exit program." msgstr "" #: hocr-gtk:748 msgid "Open.." msgstr "" #: hocr-gtk:776 hocr-gtk:797 msgid "Closed, no files selected" msgstr "" #: hocr-gtk:784 msgid "Save.." msgstr "" #: hocr-gtk:973 msgid "Closed, no files scaned" msgstr "" #: hocr-gtk:1118 msgid "translator-credits" msgstr "" #: hocr-gtk:1129 msgid "Set text font" msgstr "" #: hocr-gtk.glade.h:1 msgid "1" msgstr "" #: hocr-gtk.glade.h:2 msgid "2" msgstr "" #: hocr-gtk.glade.h:3 msgid "3" msgstr "" #: hocr-gtk.glade.h:4 msgid "4" msgstr "" #: hocr-gtk.glade.h:5 msgid "Black and White" msgstr "" #: hocr-gtk.glade.h:6 msgid "Direction" msgstr "" #: hocr-gtk.glade.h:7 msgid "Engine" msgstr "" #: hocr-gtk.glade.h:8 msgid "Font" msgstr "" #: hocr-gtk.glade.h:9 msgid "Font 1" msgstr "" #: hocr-gtk.glade.h:10 msgid "Font 2" msgstr "" #: hocr-gtk.glade.h:11 msgid "Font 3" msgstr "" #: hocr-gtk.glade.h:12 msgid "Font 4" msgstr "" #: hocr-gtk.glade.h:13 msgid "Font 5" msgstr "" #: hocr-gtk.glade.h:14 msgid "Font 6" msgstr "" #: hocr-gtk.glade.h:15 msgid "Font splicing" msgstr "" #: hocr-gtk.glade.h:16 msgid "Hocr" msgstr "" #: hocr-gtk.glade.h:17 msgid "Image" msgstr "" #: hocr-gtk.glade.h:18 msgid "Image processing" msgstr "" #: hocr-gtk.glade.h:19 msgid "LTR" msgstr "" #: hocr-gtk.glade.h:20 msgid "Layout" msgstr "" #: hocr-gtk.glade.h:21 msgid "Line leeway" msgstr "" #: hocr-gtk.glade.h:22 msgid "Linguistics" msgstr "" #: hocr-gtk.glade.h:23 msgid "Ocrad" msgstr "" #: hocr-gtk.glade.h:24 msgid "Original" msgstr "" #: hocr-gtk.glade.h:25 msgid "RTL" msgstr "" #: hocr-gtk.glade.h:26 msgid "Scale" msgstr "" #: hocr-gtk.glade.h:27 msgid "Scan" msgstr "" #: hocr-gtk.glade.h:28 msgid "Tesseract" msgstr "" #: hocr-gtk.glade.h:29 msgid "Threshold" msgstr "" #: hocr-gtk.glade.h:30 msgid "Threshold type" msgstr "" #: hocr-gtk.glade.h:31 msgid "Word spacing" msgstr "" #: hocr-gtk.glade.h:32 msgid "_Edit" msgstr "" #: hocr-gtk.glade.h:33 msgid "_File" msgstr "" #: hocr-gtk.glade.h:34 msgid "_Help" msgstr "" #: hocr-gtk.glade.h:35 msgid "_View" msgstr "" #: hocr-gtk.glade.h:36 msgid "adaptive" msgstr "" #: hocr-gtk.glade.h:37 msgid "agresive" msgstr "" #: hocr-gtk.glade.h:38 msgid "auto" msgstr "" #: hocr-gtk.glade.h:39 msgid "auto rotate" msgstr "" #: hocr-gtk.glade.h:40 msgid "big" msgstr "" #: hocr-gtk.glade.h:41 msgid "careful" msgstr "" #: hocr-gtk.glade.h:42 msgid "clear" msgstr "" #: hocr-gtk.glade.h:43 msgid "closing" msgstr "" #: hocr-gtk.glade.h:44 msgid "column" msgstr "" #: hocr-gtk.glade.h:45 msgid "dark" msgstr "" #: hocr-gtk.glade.h:46 msgid "dilation" msgstr "" #: hocr-gtk.glade.h:47 msgid "erosion" msgstr "" #: hocr-gtk.glade.h:48 msgid "fine" msgstr "" #: hocr-gtk.glade.h:49 msgid "free" msgstr "" #: hocr-gtk.glade.h:50 msgid "gtk-about" msgstr "" #: hocr-gtk.glade.h:51 msgid "gtk-apply" msgstr "" #: hocr-gtk.glade.h:52 msgid "gtk-copy" msgstr "" #: hocr-gtk.glade.h:53 msgid "gtk-cut" msgstr "" #: hocr-gtk.glade.h:54 msgid "gtk-delete" msgstr "" #: hocr-gtk.glade.h:55 msgid "gtk-new" msgstr "" #: hocr-gtk.glade.h:56 msgid "gtk-paste" msgstr "" #: hocr-gtk.glade.h:57 msgid "gtk-quit" msgstr "" #: hocr-gtk.glade.h:58 msgid "gtk-revert-to-saved" msgstr "" #: hocr-gtk.glade.h:59 msgid "gtk-save" msgstr "" #: hocr-gtk.glade.h:60 msgid "gtk-select-font" msgstr "" #: hocr-gtk.glade.h:61 msgid "gtk-zoom-100" msgstr "" #: hocr-gtk.glade.h:62 msgid "gtk-zoom-fit" msgstr "" #: hocr-gtk.glade.h:63 msgid "gtk-zoom-in" msgstr "" #: hocr-gtk.glade.h:64 msgid "gtk-zoom-out" msgstr "" #: hocr-gtk.glade.h:65 msgid "html" msgstr "" #: hocr-gtk.glade.h:66 msgid "light" msgstr "" #: hocr-gtk.glade.h:67 msgid "nikud" msgstr "" #: hocr-gtk.glade.h:68 msgid "normal" msgstr "" #: hocr-gtk.glade.h:69 msgid "one column" msgstr "" #: hocr-gtk.glade.h:70 msgid "opening" msgstr "" #: hocr-gtk.glade.h:71 msgid "regular" msgstr "" #: hocr-gtk.glade.h:72 msgid "small" msgstr "" #: hocr-gtk.glade.h:73 msgid "spaced" msgstr "" #: hocr-gtk.glade.h:74 msgid "tight" msgstr "" #: hocr-gtk.glade.h:75 msgid "very dark" msgstr "" #: hocr-gtk.glade.h:76 msgid "very light" msgstr "" #: hocr-gtk.glade.h:77 msgid "very spaced" msgstr "" #: hocr-gtk.glade.h:78 msgid "very tight" msgstr "" libhocr-0.10.17/examples/hocr-gtk/sv_sane-pygtk.po0000644000175000017500000000455211041073321016707 00000000000000# Swedish translations for libhocr package # Svenska översättningar för paket libhocr. # Copyright (C) 2008 THE libhocr'S COPYRIGHT HOLDER # This file is distributed under the same license as the libhocr package. # kobi , 2008. # msgid "" msgstr "" "Project-Id-Version: libhocr 0.10.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-04-28 18:50+0300\n" "PO-Revision-Date: 2008-04-28 18:50+0300\n" "Last-Translator: kobi \n" "Language-Team: Swedish\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: sane-pygtk:80 msgid "" "Can't load sane-pygtk's glade GUI file, check your install.\n" "Exit program." msgstr "" #: sane-pygtk:273 #, python-format msgid "" "Can't scan preview image,\n" "%s,\n" "Check scanner settings" msgstr "" #: sane-pygtk:321 #, python-format msgid "" "Can't scan,\n" "%s,\n" "Check scanner settings" msgstr "" #: sane-pygtk.glade.h:1 msgid "(0,0) - (100,100)" msgstr "" #: sane-pygtk.glade.h:2 msgid "Brightness:" msgstr "" #: sane-pygtk.glade.h:3 msgid "Contrast:" msgstr "" #: sane-pygtk.glade.h:4 msgid "Mode:" msgstr "" #: sane-pygtk.glade.h:5 msgid "Preview" msgstr "" #: sane-pygtk.glade.h:6 msgid "Reset" msgstr "" #: sane-pygtk.glade.h:7 msgid "Resolution:" msgstr "" #: sane-pygtk.glade.h:8 msgid "Save as:" msgstr "" #: sane-pygtk.glade.h:9 msgid "Scan" msgstr "" #: sane-pygtk.glade.h:10 msgid "Scanner:" msgstr "" #: sane-pygtk.glade.h:11 msgid "Settings" msgstr "" #: sane-pygtk.glade.h:12 msgid "Update preview" msgstr "" #: sane-pygtk.glade.h:13 msgid "Window:" msgstr "" #: sane-pygtk.glade.h:14 msgid "_Edit" msgstr "" #: sane-pygtk.glade.h:15 msgid "_File" msgstr "" #: sane-pygtk.glade.h:16 msgid "_Help" msgstr "" #: sane-pygtk.glade.h:17 msgid "_Preview" msgstr "" #: sane-pygtk.glade.h:18 msgid "_Reset settings to defaults" msgstr "" #: sane-pygtk.glade.h:19 msgid "_Save current settings as defaults" msgstr "" #: sane-pygtk.glade.h:20 msgid "_Scan" msgstr "" #: sane-pygtk.glade.h:21 msgid "_View" msgstr "" #: sane-pygtk.glade.h:22 msgid "gtk-about" msgstr "" #: sane-pygtk.glade.h:23 msgid "gtk-quit" msgstr "" #: sane-pygtk.glade.h:24 msgid "gtk-zoom-100" msgstr "" #: sane-pygtk.glade.h:25 msgid "gtk-zoom-in" msgstr "" #: sane-pygtk.glade.h:26 msgid "gtk-zoom-out" msgstr "" libhocr-0.10.17/examples/hocr-gtk/hocr-gtk0000755000175000017500000015064211051627202015227 00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Generated with glade2py script # glade2py script can be found at hocr web site http://hocr.berlios.de # Copyright (C) 2008 Yaacov Zamir import sys, os import threading import time import subprocess import ConfigParser import pygtk pygtk.require('2.0') import gtk, gtk.glade import pango from hocr import * # hocr-gtk paths app_name = "hocr-gtk" locale_dir = sys.prefix + '/share/locale' glade_file = 'hocr-gtk.glade' glade_dir = sys.prefix + '/share/hocr-gtk/glade/' logo_filename = sys.prefix + '/share/pixmaps/hocr1-128.png' usr_hocr_gtk_path = os.path.expanduser("~/.hocr-gtk") # hocr-sane paths hocr_sane_path = sys.prefix + '/bin/sane-pygtk' hocr_sane_image_path = usr_hocr_gtk_path + "/temp_sane_image.png" # import the locale system try: import locale import gettext locale.setlocale(locale.LC_ALL, "") gtk.glade.bindtextdomain(app_name, locale_dir) gettext.install(app_name, locale_dir, unicode=1) except (IOError,locale.Error), e: print "WARNING: Can't load locale" _ = lambda x : x # gpl text gpl_text = """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . """ # program info app_version = hocr_get_version_string() copyright = "Copyright (C) Yaacov Zamir " comments = _("Hocr-GTK, Hebrew optical character recognition\ngraphical front end (GTK)\n\n") comments += hocr_get_build_string() artists = [_("Shlomi Israel ")] authors = [_("Yaacov Zamir ")] # search for python-imaging-sane have_sane = True try: import sane except: have_sane = False # tesseract paths tesseract_path = sys.prefix + "/bin/tesseract" tesseract_image_path = usr_hocr_gtk_path + "/temp_tess_image.tif" tesseract_text_path = usr_hocr_gtk_path + "/temp_tess_text" # search for tesseract have_tesseract = os.path.isfile(tesseract_path) # ocrad paths ocrad_path = sys.prefix + "/bin/ocrad" ocrad_image_path = usr_hocr_gtk_path + "/temp_ocrad_image.pnm" ocrad_text_path = usr_hocr_gtk_path + "/temp_ocrad_text.txt" # search for ocrad have_ocrad = os.path.isfile(ocrad_path) # try and create a .hocr_gtk directory if not os.path.exists(usr_hocr_gtk_path): os.mkdir(usr_hocr_gtk_path) # set global functions def update_preview_cb(file_chooser, preview): filename = file_chooser.get_preview_filename() try: pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(filename, 128, 128) preview.set_from_pixbuf(pixbuf) have_preview = True except: have_preview = False file_chooser.set_preview_widget_active(have_preview) return def show_error_message(message): dlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR ,message_format = message ,buttons=gtk.BUTTONS_OK) dlg.run() dlg.destroy() class ProgressSet(threading.Thread): "set the fraction of the progressbar" def __init__ (self, pulse = False): threading.Thread.__init__(self) self.pulse = pulse # thread event, stops the thread if it is set. stopthread = threading.Event() def run(self): "run while thread is alive." # importing the progressbar from the global scope global progressbar global hocr_obj self.stopthread.clear() # main loop while not self.stopthread.isSet() : # acquiring the gtk global mutex gtk.gdk.threads_enter() # set the fraction if self.pulse: progressbar.pulse() else: progressbar.set_fraction(1.0 * hocr_obj.progress / 100.0) # releasing the gtk global mutex gtk.gdk.threads_leave() # delaying time.sleep(0.2) def stop(self): "stop main loop" progressbar.set_fraction(1.0 * hocr_obj.progress / 100.0) self.stopthread.set() class RunHocrOCR(threading.Thread): def run(self): # importing the ocr object from the global scope global main_window global hocr_obj global menuitem_clear global textbuffer global textview global progressbar global image_window_type global hocr_pixbuf global pixbuf global image ps = ProgressSet() # set cursor to gtk.gdk.WATCH and print processing on the progress bar textview.get_parent_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) progressbar.show() # do ocr ps.start() progressbar.set_text(_("Image Processing...")) hocr_obj.do_image_processing() # do extra image processing if main_window.menuitem_image_processing_closing.get_active(): hocr_obj.do_bitmap_closing () if main_window.menuitem_image_processing_opening.get_active(): hocr_obj.do_bitmap_opening () if main_window.menuitem_image_processing_erosion.get_active(): hocr_obj.do_bitmap_erosion () if main_window.menuitem_image_processing_dilation.get_active(): hocr_obj.do_bitmap_dilation () progressbar.set_text(_("Layout Analysis...")) hocr_obj.do_layout_analysis () progressbar.set_text(_("Font Recognition...")) hocr_obj.do_font_recognition () #hocr_obj.do_ocr() ps.stop() # set the new image in image window if image_window_type == 0: hocr_pixbuf = pixbuf.copy() else: # create an hocr pixbuf if image_window_type == 1: pix = hocr_obj.get_bitmap_pixbuf () if image_window_type == 2: pix = hocr_obj.get_layout_pixbuf () # create a gtk pixbuf hocr_pixbuf = gtk.gdk.pixbuf_new_from_data( ho_pixbuf_get_data_string(pix), gtk.gdk.COLORSPACE_RGB, 0, 8, pix.width, pix.height, pix.rowstride) ho_pixbuf_free(pix) main_window.on_image_refresh(None, None) # return original cursor and print idle on the progress bar textview.get_parent_window().set_cursor(None) progressbar.hide() # set text if hocr_obj.get_text(): if menuitem_clear.get_active(): textbuffer.set_text(hocr_obj.get_text()) else: textbuffer.insert_at_cursor(hocr_obj.get_text()) textview.grab_focus() class RunTessOCR(threading.Thread): def run(self): # importing the ocr object from the global scope global main_window global hocr_obj global menuitem_clear global textbuffer global textview global progressbar global image_window_type global hocr_pixbuf global pixbuf global image global tesseract_path global tesseract_image_path global tesseract_text_path ps = ProgressSet(True) # set cursor to gtk.gdk.WATCH and print processing on the progress bar textview.get_parent_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) progressbar.show() # do ocr progressbar.set_text(_("Processing...")) ps.start() # save the b/w image to temp file hocr_obj.do_image_processing () # do extra image processing if main_window.menuitem_image_processing_closing.get_active(): hocr_obj.do_bitmap_closing () if main_window.menuitem_image_processing_opening.get_active(): hocr_obj.do_bitmap_opening () if main_window.menuitem_image_processing_erosion.get_active(): hocr_obj.do_bitmap_erosion () if main_window.menuitem_image_processing_dilation.get_active(): hocr_obj.do_bitmap_dilation () hocr_obj.save_bitmap_as_tiff (tesseract_image_path) # run tess on the b/w image file # call tesseract command line tool # FIXME: this is ugly args = [tesseract_path, tesseract_image_path, tesseract_text_path] proc = subprocess.Popen(args) retcode = proc.wait() # FIXME: check retcode # get text f = open(tesseract_text_path + '.txt') try: text = f.read() finally: f.close() if text: if menuitem_clear.get_active(): textbuffer.set_text(text) else: textbuffer.insert_at_cursor(text) textview.grab_focus() # clean the temp file os.remove (tesseract_image_path) os.remove (tesseract_text_path + '.txt') ps.stop() # set the new image in image window if image_window_type == 0: hocr_pixbuf = pixbuf.copy() else: # create an hocr pixbuf pix = hocr_obj.get_bitmap_pixbuf () # create a gtk pixbuf hocr_pixbuf = gtk.gdk.pixbuf_new_from_data( ho_pixbuf_get_data_string(pix), gtk.gdk.COLORSPACE_RGB, 0, 8, pix.width, pix.height, pix.rowstride) ho_pixbuf_free(pix) main_window.on_image_refresh(None, None) # return original cursor and print idle on the progress bar textview.get_parent_window().set_cursor(None) progressbar.hide() # set text if hocr_obj.get_text(): if menuitem_clear.get_active(): textbuffer.set_text(hocr_obj.get_text()) else: textbuffer.insert_at_cursor(hocr_obj.get_text()) textview.grab_focus() class RunOcradOCR(threading.Thread): def run(self): # importing the ocr object from the global scope global main_window global hocr_obj global menuitem_clear global textbuffer global textview global progressbar global image_window_type global hocr_pixbuf global pixbuf global image global tesseract_path global tesseract_image_path global tesseract_text_path ps = ProgressSet(True) # set cursor to gtk.gdk.WATCH and print processing on the progress bar textview.get_parent_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) progressbar.show() # do ocr progressbar.set_text(_("Processing...")) ps.start() # save the b/w image to temp file hocr_obj.do_image_processing () # do extra image processing if main_window.menuitem_image_processing_closing.get_active(): hocr_obj.do_bitmap_closing () if main_window.menuitem_image_processing_opening.get_active(): hocr_obj.do_bitmap_opening () if main_window.menuitem_image_processing_erosion.get_active(): hocr_obj.do_bitmap_erosion () if main_window.menuitem_image_processing_dilation.get_active(): hocr_obj.do_bitmap_dilation () hocr_obj.save_bitmap_as_pnm (ocrad_image_path) # run ocrad on the b/w image file # call ocrad command line tool # FIXME: this is ugly args = [ocrad_path, "-o", ocrad_text_path, ocrad_image_path] proc = subprocess.Popen(args) retcode = proc.wait() # FIXME: check retcode # get text f = open(ocrad_text_path) try: text = f.read() finally: f.close() if text: if menuitem_clear.get_active(): textbuffer.set_text(text) else: textbuffer.insert_at_cursor(text) textview.grab_focus() # clean the temp file os.remove (ocrad_image_path) os.remove (ocrad_text_path) ps.stop() # set the new image in image window if image_window_type == 0: hocr_pixbuf = pixbuf.copy() else: # create an hocr pixbuf pix = hocr_obj.get_bitmap_pixbuf () # create a gtk pixbuf hocr_pixbuf = gtk.gdk.pixbuf_new_from_data( ho_pixbuf_get_data_string(pix), gtk.gdk.COLORSPACE_RGB, 0, 8, pix.width, pix.height, pix.rowstride) ho_pixbuf_free(pix) main_window.on_image_refresh(None, None) # return original cursor and print idle on the progress bar textview.get_parent_window().set_cursor(None) progressbar.hide() # set text if hocr_obj.get_text(): if menuitem_clear.get_active(): textbuffer.set_text(hocr_obj.get_text()) else: textbuffer.insert_at_cursor(hocr_obj.get_text()) textview.grab_focus() # set main window class class MainWindow: def __init__(self): global progressbar global hocr_obj global menuitem_clear global textbuffer global textview global pixbuf global hocr_pixbuf global image # create widget tree ... xml = False if os.path.isfile(glade_file): xml = gtk.glade.XML(glade_file, 'window_main', app_name) else: if os.path.isfile(glade_dir + glade_file): xml = gtk.glade.XML(glade_dir + glade_file, 'window_main', app_name) if not xml: print "ERROR: Can't load glade GUI file, check your install." show_error_message(_("Can't load hocr's glade GUI file, check your install.\nExit program.")) sys.exit(0) # create config object with default values self.config = ConfigParser.ConfigParser() self.config.add_section('edit') self.config.set('edit', 'clear', '1') self.config.set('edit', 'html', '0') self.config.set('edit', 'nikud', '1') self.config.set('edit', 'linguistics', '0') self.config.set('edit', 'autorotate', '1') self.config.set('edit', 'closing', '0') self.config.set('edit', 'opening', '0') self.config.set('edit', 'dilation', '0') self.config.set('edit', 'erosion', '0') self.config.set('edit', 'column', '0') self.config.set('edit', 'font', '1') self.config.set('edit', 'scale', '0') self.config.set('edit', 'threshold', '1') self.config.set('edit', 'threshold_v', '0') self.config.set('edit', 'font_spacing', '0') self.config.set('edit', 'font_splicing', '0') self.config.set('edit', 'line_leeway', '0') self.config.set('edit', 'engine', '0') self.config.set('edit', 'rtl', '0') self.config.add_section('view') self.config.set('view', 'font', 'sans 12') self.config.set('view', 'window_width', '0') self.config.set('view', 'window_height', '0') # read config file and overwrite default values self.config.read([usr_hocr_gtk_path + "/hocr-gtk.cfg"]) # connect handlers xml.signal_autoconnect(self) # widgets self.window_main = xml.get_widget('window_main') self.image = xml.get_widget('image') self.textview = xml.get_widget('textview') self.progressbar = xml.get_widget('progressbar') self.statusbar1 = xml.get_widget('statusbar1') progressbar = self.progressbar textview = self.textview image = self.image # init progress bar and hide it progressbar.hide() # text self.textbuffer = self.textview.get_buffer() self.clipboard = gtk.Clipboard() self.textview.grab_focus() textbuffer = self.textbuffer # image self.preview = gtk.Image() self.filename = "" pixbuf = None hocr_pixbuf = None self.zoom_factor = 1.0 # the sane button self.separatormenuitem3 = xml.get_widget('separatormenuitem3') self.imagemenuitem_scan = xml.get_widget('imagemenuitem_scan') # hocr_pixbuf options self.menuitem_orig = xml.get_widget('menuitem_orig') self.menuitem_bw = xml.get_widget('menuitem_bw') self.menuitem_layout = xml.get_widget('menuitem_layout') # edit self.menuitem_clear = xml.get_widget('menuitem_clear') self.menuitem_html = xml.get_widget('menuitem_html') self.menuitem_nikud = xml.get_widget('menuitem_nikud') self.menuitem_linguistics = xml.get_widget('menuitem_linguistics') self.menuitem_autorotate = xml.get_widget('menuitem_autorotate') self.menuitem_image_processing_closing = xml.get_widget('menuitem_image_processing_closing') self.menuitem_image_processing_opening = xml.get_widget('menuitem_image_processing_opening') self.menuitem_image_processing_dilation = xml.get_widget('menuitem_image_processing_dilation') self.menuitem_image_processing_erosion = xml.get_widget('menuitem_image_processing_erosion') self.menuitem_column_auto = xml.get_widget('menuitem_column_auto') self.menuitem_column_free = xml.get_widget('menuitem_column_free') self.menuitem_column_one = xml.get_widget('menuitem_column_one') self.menuitem_scale_auto = xml.get_widget('menuitem_scale_auto') self.menuitem_scale_1 = xml.get_widget('menuitem_scale_1') self.menuitem_scale_2 = xml.get_widget('menuitem_scale_2') self.menuitem_scale_3 = xml.get_widget('menuitem_scale_3') self.menuitem_scale_4 = xml.get_widget('menuitem_scale_4') self.menuitem_threshold_no = xml.get_widget('menuitem_threshold_no') self.menuitem_threshold_adaptive = xml.get_widget('menuitem_threshold_adaptive') self.menuitem_threshold_fine = xml.get_widget('menuitem_threshold_fine') self.menuitem_threshold_v_0 = xml.get_widget('menuitem_threshold_v_0') self.menuitem_threshold_v_20 = xml.get_widget('menuitem_threshold_v_20') self.menuitem_threshold_v_90 = xml.get_widget('menuitem_threshold_v_90') self.menuitem_threshold_v_70 = xml.get_widget('menuitem_threshold_v_70') self.menuitem_threshold_v_40 = xml.get_widget('menuitem_threshold_v_40') self.menuitem_font_spacing_normal = xml.get_widget('menuitem_font_spacing_normal') self.menuitem_font_spacing_spaced = xml.get_widget('menuitem_font_spacing_spaced') self.menuitem_font_spacing_tight = xml.get_widget('menuitem_font_spacing_tight') self.menuitem_font_spacing_v_spaced = xml.get_widget('menuitem_font_spacing_v_spaced') self.menuitem_font_spacing_v_tight = xml.get_widget('menuitem_font_spacing_v_tight') self.menuitem_font_splicing_normal = xml.get_widget('menuitem_font_splicing_normal') self.menuitem_font_splicing_agresive = xml.get_widget('menuitem_font_splicing_agresive') self.menuitem_font_splicing_careful = xml.get_widget('menuitem_font_splicing_careful') self.menuitem_line_leeway_small = xml.get_widget('menuitem_line_leeway_small') self.menuitem_line_leeway_big = xml.get_widget('menuitem_line_leeway_big') self.separatormenuitem_font = xml.get_widget('separatormenuitem_font') self.menuitem_font = xml.get_widget('menuitem_font') self.menuitem_font_1 = xml.get_widget('menuitem_font_1') self.menuitem_font_2 = xml.get_widget('menuitem_font_2') self.menuitem_font_3 = xml.get_widget('menuitem_font_3') self.menuitem_font_4 = xml.get_widget('menuitem_font_4') self.menuitem_font_5 = xml.get_widget('menuitem_font_5') self.menuitem_font_6 = xml.get_widget('menuitem_font_6') self.menuitem_engine_hocr = xml.get_widget('menuitem_engine_hocr') self.menuitem_dir_rtl = xml.get_widget('menuitem_dir_rtl') self.menuitem_dir_ltr = xml.get_widget('menuitem_dir_ltr') self.menuitem_engine_ocrad = xml.get_widget('menuitem_engine_ocrad') self.menuitem_engine_tess = xml.get_widget('menuitem_engine_tess') menuitem_clear = self.menuitem_clear # set options using the config file self.on_menuitem_revert_activate(None) if self.config.getint('view', 'window_width') > 0: self.window_main.resize(self.config.getint('view', 'window_width'), self.config.getint('view', 'window_height')) # ocr self.hocr_obj = Hocr() hocr_obj = self.hocr_obj # signal handlers def on_window_main_delete_event(self, widget, obj): "on_window_main_delete_event activated" # get config values if self.menuitem_clear.get_active(): self.config.set('edit', 'clear', '1') else: self.config.set('edit', 'clear', '0') if self.menuitem_html.get_active(): self.config.set('edit', 'html', '1') else: self.config.set('edit', 'html', '0') if self.menuitem_nikud.get_active(): self.config.set('edit', 'nikud', '1') else: self.config.set('edit', 'nikud', '0') if self.menuitem_linguistics.get_active(): self.config.set('edit', 'linguistics', '1') else: self.config.set('edit', 'linguistics', '0') if self.menuitem_autorotate.get_active(): self.config.set('edit', 'autorotate', '1') else: self.config.set('edit', 'autorotate', '0') if self.menuitem_image_processing_opening.get_active(): self.config.set('edit', 'opening', '1') else: self.config.set('edit', 'opening', '0') if self.menuitem_image_processing_closing.get_active(): self.config.set('edit', 'closing', '1') else: self.config.set('edit', 'closing', '0') if self.menuitem_image_processing_dilation.get_active(): self.config.set('edit', 'dilation', '1') else: self.config.set('edit', 'dilation', '0') if self.menuitem_image_processing_erosion.get_active(): self.config.set('edit', 'erosion', '1') else: self.config.set('edit', 'erosion', '0') if self.menuitem_column_auto.get_active(): self.config.set('edit', 'column', '0') if self.menuitem_column_free.get_active(): self.config.set('edit', 'column', '255') if self.menuitem_column_one.get_active(): self.config.set('edit', 'column', '1') if self.menuitem_scale_auto.get_active(): self.config.set('edit', 'scale', '0') if self.menuitem_scale_1.get_active(): self.config.set('edit', 'scale', '1') if self.menuitem_scale_2.get_active(): self.config.set('edit', 'scale', '2') if self.menuitem_scale_3.get_active(): self.config.set('edit', 'scale', '3') if self.menuitem_scale_4.get_active(): self.config.set('edit', 'scale', '4') if self.menuitem_threshold_no.get_active(): self.config.set('edit', 'threshold', '0') if self.menuitem_threshold_adaptive.get_active(): self.config.set('edit', 'threshold', '1') if self.menuitem_threshold_fine.get_active(): self.config.set('edit', 'threshold', '2') if self.menuitem_threshold_v_0.get_active(): self.config.set('edit', 'threshold_v', '0') if self.menuitem_threshold_v_20.get_active(): self.config.set('edit', 'threshold_v', '20') if self.menuitem_threshold_v_90.get_active(): self.config.set('edit', 'threshold_v', '90') if self.menuitem_threshold_v_70.get_active(): self.config.set('edit', 'threshold_v', '70') if self.menuitem_threshold_v_40.get_active(): self.config.set('edit', 'threshold_v', '40') if self.menuitem_font_spacing_normal.get_active(): self.config.set('edit', 'font_spacing', '0') if self.menuitem_font_spacing_spaced.get_active(): self.config.set('edit', 'font_spacing', '1') if self.menuitem_font_spacing_tight.get_active(): self.config.set('edit', 'font_spacing', '2') if self.menuitem_font_spacing_v_spaced.get_active(): self.config.set('edit', 'font_spacing', '3') if self.menuitem_font_spacing_v_tight.get_active(): self.config.set('edit', 'font_spacing', '4') if self.menuitem_font_splicing_normal.get_active(): self.config.set('edit', 'font_splicing', '0') if self.menuitem_font_splicing_agresive.get_active(): self.config.set('edit', 'font_splicing', '1') if self.menuitem_font_splicing_careful.get_active(): self.config.set('edit', 'font_splicing', '2') if self.menuitem_line_leeway_small.get_active(): self.config.set('edit', 'line_leeway', '0') if self.menuitem_line_leeway_big.get_active(): self.config.set('edit', 'line_leeway', '1') if self.menuitem_engine_hocr.get_active(): self.config.set('edit', 'engine', '0') if self.menuitem_engine_tess.get_active(): self.config.set('edit', 'engine', '1') if self.menuitem_engine_ocrad.get_active(): self.config.set('edit', 'engine', '2') if self.menuitem_font_1.get_active(): self.config.set('edit', 'font', '1') if self.menuitem_font_2.get_active(): self.config.set('edit', 'font', '2') if self.menuitem_font_3.get_active(): self.config.set('edit', 'font', '3') if self.menuitem_font_4.get_active(): self.config.set('edit', 'font', '4') if self.menuitem_font_5.get_active(): self.config.set('edit', 'font', '5') if self.menuitem_font_6.get_active(): self.config.set('edit', 'font', '6') if self.menuitem_dir_rtl.get_active(): self.config.set('edit', 'rtl', '0') if self.menuitem_dir_ltr.get_active(): self.config.set('edit', 'rtl', '1') view_font = self.textview.get_pango_context().get_font_description().to_string() self.config.set('view', 'font', view_font) w, h = self.window_main.get_size() self.config.set('view', 'window_width', w) self.config.set('view', 'window_height', h) # write config file self.config.write(open(usr_hocr_gtk_path + "/hocr-gtk.cfg", 'wb')) gtk.main_quit() def on_imagemenuitem_new_activate(self, obj, event = None): "on_imagemenuitem_new_activate activated" global pixbuf global hocr_pixbuf chooser = gtk.FileChooserDialog(_("Open.."), None, gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) chooser.set_filename(self.filename) chooser.set_preview_widget(self.preview) chooser.connect("update-preview", update_preview_cb, self.preview) response = chooser.run() if response == gtk.RESPONSE_OK: self.filename = chooser.get_filename() # get new image pixbuf = gtk.gdk.pixbuf_new_from_file (self.filename) # clean processed image hocr_pixbuf = None factor = self.zoom_factor w = pixbuf.get_width() h = pixbuf.get_height() window_pixbuf = pixbuf.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) self.progressbar.set_fraction(0) # set window title self.window_main.set_title("hocr-gtk - " + self.filename) elif response == gtk.RESPONSE_CANCEL: print _('Closed, no files selected') chooser.destroy() self.textview.grab_focus() def on_imagemenuitem_save_activate(self, obj, event = None): "on_imagemenuitem_save_activate activated" chooser = gtk.FileChooserDialog(_("Save.."), None, gtk.FILE_CHOOSER_ACTION_SAVE, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK)) response = chooser.run() if response == gtk.RESPONSE_OK: filename = chooser.get_filename() thefile = open(filename, 'w') thefile.write (self.textbuffer.get_text(self.textbuffer.get_start_iter(), self.textbuffer.get_end_iter())) thefile.close() elif response == gtk.RESPONSE_CANCEL: print _('Closed, no files selected') chooser.destroy() self.textview.grab_focus() def on_menuitem_apply_activate(self, obj, event = None): "on_menuitem_apply_activate activated" global pixbuf if not (self.filename and pixbuf) : return # create hocr pixbuf pix = ho_pixbuf_new (pixbuf.get_n_channels(), pixbuf.get_width(), pixbuf.get_height (), pixbuf.get_rowstride ()) ho_pixbuf_set_data (pix, pixbuf.get_pixels()) # check ocr engine # use hocr if self.menuitem_engine_hocr.get_active(): # set ocr options self.hocr_obj.set_pixbuf(pix) self.hocr_obj.set_html(self.menuitem_html.get_active()) self.hocr_obj.set_nikud(self.menuitem_nikud.get_active()) self.hocr_obj.set_do_linguistics(self.menuitem_linguistics.get_active()) self.hocr_obj.set_no_auto_rotate(not self.menuitem_autorotate.get_active()) if self.menuitem_column_auto.get_active(): self.hocr_obj.set_paragraph_setup(0) elif self.menuitem_column_free.get_active(): self.hocr_obj.set_paragraph_setup(255) else: self.hocr_obj.set_paragraph_setup(1) if self.menuitem_font_1.get_active(): self.hocr_obj.set_font (0) if self.menuitem_font_2.get_active(): self.hocr_obj.set_font (1) if self.menuitem_font_3.get_active(): self.hocr_obj.set_font (2) if self.menuitem_font_4.get_active(): self.hocr_obj.set_font (3) if self.menuitem_font_5.get_active(): self.hocr_obj.set_font (4) if self.menuitem_font_6.get_active(): self.hocr_obj.set_font (5) if self.menuitem_scale_auto.get_active(): self.hocr_obj.set_auto_scale () if self.menuitem_scale_1.get_active(): self.hocr_obj.set_scale (1) if self.menuitem_scale_2.get_active(): self.hocr_obj.set_scale (2) if self.menuitem_scale_3.get_active(): self.hocr_obj.set_scale (3) if self.menuitem_scale_4.get_active(): self.hocr_obj.set_scale (4) if self.menuitem_font_spacing_normal.get_active(): self.hocr_obj.set_font_spacing_code (0) if self.menuitem_font_spacing_spaced.get_active(): self.hocr_obj.set_font_spacing_code (2) if self.menuitem_font_spacing_tight.get_active(): self.hocr_obj.set_font_spacing_code (-2) if self.menuitem_font_spacing_v_spaced.get_active(): self.hocr_obj.set_font_spacing_code (3) if self.menuitem_font_spacing_v_tight.get_active(): self.hocr_obj.set_font_spacing_code (-3) if self.menuitem_font_splicing_normal.get_active(): self.hocr_obj.set_slicing_width (0) self.hocr_obj.set_slicing_threshold (0) if self.menuitem_font_splicing_agresive.get_active(): self.hocr_obj.set_slicing_width (50) self.hocr_obj.set_slicing_threshold (90) if self.menuitem_font_splicing_careful.get_active(): self.hocr_obj.set_slicing_width (254) self.hocr_obj.set_slicing_threshold (2) if self.menuitem_threshold_no.get_active(): self.hocr_obj.set_adaptive (1) if self.menuitem_threshold_v_20.get_active(): self.hocr_obj.set_threshold (20) if self.menuitem_threshold_v_90.get_active(): self.hocr_obj.set_threshold (90) if self.menuitem_threshold_v_70.get_active(): self.hocr_obj.set_threshold (70) if self.menuitem_threshold_v_40.get_active(): self.hocr_obj.set_threshold (40) if self.menuitem_threshold_adaptive.get_active(): self.hocr_obj.set_adaptive (0) if self.menuitem_threshold_v_20.get_active(): self.hocr_obj.set_a_threshold (50) if self.menuitem_threshold_v_90.get_active(): self.hocr_obj.set_a_threshold (90) if self.menuitem_threshold_v_70.get_active(): self.hocr_obj.set_a_threshold (80) if self.menuitem_threshold_v_40.get_active(): self.hocr_obj.set_a_threshold (60) if self.menuitem_threshold_fine.get_active(): self.hocr_obj.set_adaptive (2) if self.menuitem_threshold_v_20.get_active(): self.hocr_obj.set_a_threshold (50) if self.menuitem_threshold_v_90.get_active(): self.hocr_obj.set_a_threshold (90) if self.menuitem_threshold_v_70.get_active(): self.hocr_obj.set_a_threshold (80) if self.menuitem_threshold_v_40.get_active(): self.hocr_obj.set_a_threshold (60) if self.menuitem_dir_rtl.get_active(): self.hocr_obj.set_dir_ltr (0) if self.menuitem_dir_ltr.get_active(): self.hocr_obj.set_dir_ltr (1) if self.menuitem_line_leeway_small.get_active(): self.hocr_obj.set_line_leeway (80) if self.menuitem_line_leeway_big.get_active(): self.hocr_obj.set_line_leeway (80) # run ocr ro = RunHocrOCR() ro.start() # use tesseract if self.menuitem_engine_tess.get_active(): # get the b/w image self.hocr_obj.set_pixbuf (pix) # run ocr ro = RunTessOCR() ro.start() # use ocrad if self.menuitem_engine_ocrad.get_active(): # get the b/w image self.hocr_obj.set_pixbuf (pix) # run ocr ro = RunOcradOCR() ro.start() def on_imagemenuitem_scan_activate(self, obj, event = None): "on_imagemenuitem_acuire_activate activated" global pixbuf global hocr_pixbuf global hocr_sane_path global hocr_sane_image_path # run hocr-sane args = [hocr_sane_path, '--file', hocr_sane_image_path] proc = subprocess.Popen(args) retcode = proc.wait() # if retcode is 99 image is saved by hocr-sane if retcode == 99: self.filename = hocr_sane_image_path # get new image pixbuf = gtk.gdk.pixbuf_new_from_file (self.filename) # remove temporary image os.remove (self.filename) # clean processed image hocr_pixbuf = None factor = self.zoom_factor w = pixbuf.get_width() h = pixbuf.get_height() window_pixbuf = pixbuf.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) self.progressbar.set_fraction(0) else: print _('Closed, no files scaned') self.textview.grab_focus() def on_imagemenuitem_quit_activate(self, obj, event = None): "on_imagemenuitem_quit_activate activated" self.on_window_main_delete_event(None, None) def on_imagemenuitem_cut_activate(self, obj, event = None): "on_imagemenuitem_cut_activate activated" self.textbuffer.cut_clipboard(self.clipboard, True) def on_imagemenuitem_copy_activate(self, obj, event = None): "on_imagemenuitem_copy_activate activated" self.textbuffer.copy_clipboard(self.clipboard) def on_imagemenuitem_paste_activate(self, obj, event = None): "on_imagemenuitem_paste_activate activated" self.textbuffer.paste_clipboard(self.clipboard, None, True) def on_imagemenuitem_delete_activate(self, obj, event = None): "on_imagemenuitem_delete_activate activated" self.textbuffer.delete_selection(True, True) def on_menuitem_zoom_in_activate(self, obj, event = None): "on_menuitem_zoom_in_activate activated" global pixbuf global hocr_pixbuf self.zoom_factor *= 1.2 pix = hocr_pixbuf if not pix: pix = pixbuf if not pix: return factor = self.zoom_factor w = pix.get_width() h = pix.get_height() window_pixbuf = pix.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) def on_menuitem_zoom_out_activate(self, obj, event = None): "on_menuitem_zoom_out_activate activated" global pixbuf global hocr_pixbuf self.zoom_factor *= 0.8 pix = hocr_pixbuf if not pix: pix = pixbuf if not pix: return factor = self.zoom_factor w = pix.get_width() h = pix.get_height() window_pixbuf = pix.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) def on_menuitem_zoom_100_activate(self, obj, event = None): "on_menuitem_zoom_100_activate activated" global pixbuf global hocr_pixbuf self.zoom_factor = 1.0 pix = hocr_pixbuf if not pix: pix = pixbuf if not pix: return factor = self.zoom_factor w = pix.get_width() h = pix.get_height() window_pixbuf = pix.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) def on_menuitem_best_fit_activate(self, obj, event = None): "on_menuitem_best_fit_activate activated" global pixbuf global hocr_pixbuf pix = hocr_pixbuf if not pix: pix = pixbuf if not pix: return w = pix.get_width() h = pix.get_height() width, height = self.window_main.get_size() # give image some leeway if width > 100: width -= 40; self.zoom_factor = 1.0 * width / w factor = self.zoom_factor window_pixbuf = pix.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) def on_image_refresh(self, obj, event = None): "on_menuitem_best_fit_activate activated" global pixbuf global hocr_pixbuf pix = hocr_pixbuf if not pix: pix = pixbuf if not pix: return w = pix.get_width() h = pix.get_height() factor = self.zoom_factor window_pixbuf = pix.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) def on_imagemenuitem_about_activate(self, obj, event = None): "on_imagemenuitem_about_activate activated" dialog = gtk.AboutDialog() dialog.set_name(app_name) dialog.set_version(app_version) dialog.set_copyright(copyright) dialog.set_comments(comments) logo_pix = gtk.gdk.pixbuf_new_from_file(logo_filename) dialog.set_logo(logo_pix) dialog.set_license(gpl_text) dialog.set_translator_credits(_("translator-credits")) dialog.set_artists(artists) dialog.set_authors(authors) dialog.run() dialog.destroy() self.textview.grab_focus() def on_menuitem_select_font_activate(self, obj, event = None): "on_imagemenuitem_about_activate activated" dialog = gtk.FontSelectionDialog(_("Set text font")) dialog.run() self.textview.modify_font(pango.FontDescription(dialog.get_font_name())) dialog.destroy() self.textview.grab_focus() def on_toolbutton_open_clicked(self, obj, event = None): "on_toolbutton_open_clicked activated" self.on_imagemenuitem_new_activate(self, None) def on_toolbutton_apply_clicked(self, obj, event = None): "on_toolbutton_apply_clicked activated" self.on_menuitem_apply_activate(self, None) def on_toolbutton_save_clicked(self, obj, event = None): "on_toolbutton_save_clicked activated" self.on_imagemenuitem_save_activate(self, None) def on_toolbutton_zoom_in_clicked(self, obj, event = None): "on_toolbutton_zoom_in_clicked activated" self.on_menuitem_zoom_in_activate(self, None) def on_toolbutton_zoom_out_clicked(self, obj, event = None): "on_toolbutton_zoom_out_clicked activated" self.on_menuitem_zoom_out_activate(self, None) def on_toolbutton_zoom_100_clicked(self, obj, event = None): "on_toolbutton_zoom_100_clicked activated" self.on_menuitem_zoom_100_activate(self, None) def on_toolbutton_best_fit_clicked(self, obj, event = None): "on_toolbutton_zoom_100_clicked activated" self.on_menuitem_best_fit_activate(self, None) def on_toolbutton_quit_clicked(self, obj, event = None): "on_toolbutton_quit_clicked activated" self.on_window_main_delete_event(None, None) def on_menuitem_orig_toggled(self, obj, event = None): "on_menuitem_orig_toggled activated" global image_window_type global hocr_pixbuf global pixbuf # is this item active ? if not obj.get_active(): return image_window_type = 0 # do we have an hocr pixbuf ? if not hocr_pixbuf and not pixbuf: return # get the new image hocr_pixbuf = pixbuf.copy() # if not hocr_pixbuf: hocr_pixbuf = pixbuf factor = self.zoom_factor w = hocr_pixbuf.get_width() h = hocr_pixbuf.get_height() window_pixbuf = hocr_pixbuf.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) def on_menuitem_bw_toggled(self, obj, event = None): "on_menuitem_bw_toggled activated" global image_window_type global hocr_pixbuf global pixbuf if not obj.get_active(): return image_window_type = 1 # do we have an hocr pixbuf ? if not hocr_pixbuf and not pixbuf: return # get the new image ho_pix = self.hocr_obj.get_bitmap_pixbuf () # create a gtk pixbuf hocr_pixbuf = gtk.gdk.pixbuf_new_from_data( ho_pixbuf_get_data_string(ho_pix), gtk.gdk.COLORSPACE_RGB, 0, 8, ho_pix.width, ho_pix.height, ho_pix.rowstride) ho_pixbuf_free(ho_pix) if not hocr_pixbuf: hocr_pixbuf = pixbuf factor = self.zoom_factor w = hocr_pixbuf.get_width() h = hocr_pixbuf.get_height() window_pixbuf = hocr_pixbuf.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) def on_menuitem_layout_toggled(self, obj, event = None): "on_menuitem_layout_toggled activated" global image_window_type global hocr_pixbuf global pixbuf if not obj.get_active(): return image_window_type = 2 # do we have an hocr pixbuf or an original pixbuf? if not hocr_pixbuf and not pixbuf: return # get the new image ho_pix = self.hocr_obj.get_layout_pixbuf () # if we do not have a layout, try b/w if not ho_pix: ho_pix = self.hocr_obj.get_bitmap_pixbuf () # create a gtk pixbuf hocr_pixbuf = gtk.gdk.pixbuf_new_from_data( ho_pixbuf_get_data_string(ho_pix), gtk.gdk.COLORSPACE_RGB, 0, 8, ho_pix.width, ho_pix.height, ho_pix.rowstride) ho_pixbuf_free(ho_pix) if not hocr_pixbuf: hocr_pixbuf = pixbuf factor = self.zoom_factor w = hocr_pixbuf.get_width() h = hocr_pixbuf.get_height() window_pixbuf = hocr_pixbuf.scale_simple(int(w * factor), int(h * factor), gtk.gdk.INTERP_NEAREST) self.image.set_from_pixbuf(window_pixbuf) def on_menuitem_revert_activate(self, obj, event = None): "on_menuitem_revert_activate activated" self.menuitem_clear.set_active(self.config.getint('edit', 'clear')) self.menuitem_html.set_active(self.config.getint('edit', 'html')) self.menuitem_nikud.set_active(self.config.getint('edit', 'nikud')) self.menuitem_linguistics.set_active(self.config.getint('edit', 'linguistics')) self.menuitem_autorotate.set_active(self.config.getint('edit', 'autorotate')) self.menuitem_image_processing_opening.set_active(self.config.getint('edit', 'opening')) self.menuitem_image_processing_closing.set_active(self.config.getint('edit', 'closing')) self.menuitem_image_processing_erosion.set_active(self.config.getint('edit', 'erosion')) self.menuitem_image_processing_dilation.set_active(self.config.getint('edit', 'dilation')) self.menuitem_column_auto.set_active(self.config.getint('edit', 'column') == 0) self.menuitem_column_free.set_active(self.config.getint('edit', 'column') == 255) self.menuitem_column_one.set_active(self.config.getint('edit', 'column') == 1) self.menuitem_scale_auto.set_active(self.config.getint('edit', 'scale') == 0) self.menuitem_scale_1.set_active(self.config.getint('edit', 'scale') == 1) self.menuitem_scale_2.set_active(self.config.getint('edit', 'scale') == 2) self.menuitem_scale_3.set_active(self.config.getint('edit', 'scale') == 3) self.menuitem_scale_4.set_active(self.config.getint('edit', 'scale') == 4) self.menuitem_threshold_no.set_active(self.config.getint('edit', 'threshold') == 0) self.menuitem_threshold_adaptive.set_active(self.config.getint('edit', 'threshold') == 1) self.menuitem_threshold_fine.set_active(self.config.getint('edit', 'threshold') == 2) self.menuitem_threshold_v_0.set_active(self.config.getint('edit', 'threshold_v') == 0) self.menuitem_threshold_v_20.set_active(self.config.getint('edit', 'threshold_v') == 20) self.menuitem_threshold_v_90.set_active(self.config.getint('edit', 'threshold_v') == 90) self.menuitem_threshold_v_40.set_active(self.config.getint('edit', 'threshold_v') == 40) self.menuitem_threshold_v_70.set_active(self.config.getint('edit', 'threshold_v') == 70) self.menuitem_font_spacing_normal.set_active(self.config.getint('edit', 'font_spacing') == 0) self.menuitem_font_spacing_spaced.set_active(self.config.getint('edit', 'font_spacing') == 1) self.menuitem_font_spacing_tight.set_active(self.config.getint('edit', 'font_spacing') == 2) self.menuitem_font_spacing_v_spaced.set_active(self.config.getint('edit', 'font_spacing') == 3) self.menuitem_font_spacing_v_tight.set_active(self.config.getint('edit', 'font_spacing') == 4) self.menuitem_font_splicing_normal.set_active(self.config.getint('edit', 'font_splicing') == 0) self.menuitem_font_splicing_agresive.set_active(self.config.getint('edit', 'font_splicing') == 1) self.menuitem_font_splicing_careful.set_active(self.config.getint('edit', 'font_splicing') == 2) self.menuitem_engine_hocr.set_active(self.config.getint('edit', 'engine') == 0) self.menuitem_engine_tess.set_active(self.config.getint('edit', 'engine') == 1) self.menuitem_engine_ocrad.set_active(self.config.getint('edit', 'engine') == 2) self.menuitem_font_1.set_active(self.config.getint('edit', 'font') == 1) self.menuitem_font_2.set_active(self.config.getint('edit', 'font') == 2) self.menuitem_font_3.set_active(self.config.getint('edit', 'font') == 3) self.menuitem_font_4.set_active(self.config.getint('edit', 'font') == 4) self.menuitem_font_5.set_active(self.config.getint('edit', 'font') == 5) self.menuitem_font_6.set_active(self.config.getint('edit', 'font') == 6) self.menuitem_dir_rtl.set_active(self.config.getint('edit', 'rtl') == 0) self.menuitem_dir_ltr.set_active(self.config.getint('edit', 'rtl') == 1) self.menuitem_line_leeway_small.set_active(self.config.getint('edit', 'line_leeway') == 0) self.menuitem_line_leeway_big.set_active(self.config.getint('edit', 'line_leeway') == 1) self.textview.modify_font(pango.FontDescription(self.config.get('view', 'font'))) # run main loop def main(): global main_window main_window = MainWindow() main_window.window_main.show() # hide not implemented fonts main_window.separatormenuitem_font.hide() main_window.menuitem_font.hide() main_window.menuitem_font_1.set_active(True) # if no tesseract hide the tesseract option if not have_tesseract: main_window.menuitem_engine_tess.hide() # if no ocrad hide the ocrad option if not have_ocrad: main_window.menuitem_engine_ocrad.hide() # if no sane hide the sane button if not have_sane: main_window.separatormenuitem3.hide() main_window.imagemenuitem_scan.hide() gtk.main() #Initializing the gtk's thread engine gtk.gdk.threads_init() # things we need global progressbar = None hocr_obj = None menuitem_clear = None textbuffer = None textview = None image_window_type = 0 hocr_pixbuf = None pixbuf = None image = None main_window = None if __name__ == "__main__": main() libhocr-0.10.17/examples/hocr-gtk/sv/0000777000175000017500000000000011051630065014270 500000000000000libhocr-0.10.17/examples/hocr-gtk/sv/sane-pygtk.mo0000644000175000017500000000061411044146243016626 00000000000000$,8R9Project-Id-Version: libhocr 0.10.7 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-04-28 18:50+0300 PO-Revision-Date: 2008-04-28 18:50+0300 Last-Translator: kobi Language-Team: Swedish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); libhocr-0.10.17/examples/hocr-gtk/sv/hocr-gtk.mo0000644000175000017500000000125511044146243016264 00000000000000T w bls{&_Edit_File_Help_Viewcleartranslator-creditsProject-Id-Version: libhocr 0.10.9 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-07-30 23:14+0300 PO-Revision-Date: 2008-05-11 08:22+0300 Last-Translator: Daniel Nylander Language-Team: Swedish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); _Redigera_Arkiv_Hjälp_VisaTömDaniel Nylander libhocr-0.10.17/Makefile.in0000644000175000017500000005425711043604650012304 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Doxyfile.in \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/libhocr-gtk.pc.in $(srcdir)/libhocr.pc.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ config/config.guess config/config.sub config/depcomp \ config/install-sh config/ltmain.sh config/missing \ config/py-compile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = libhocr.pc libhocr-gtk.pc Doxyfile SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(hocrdocdir)" \ "$(DESTDIR)$(pkgconfigdir)" hocrdocDATA_INSTALL = $(INSTALL_DATA) pkgconfigDATA_INSTALL = $(INSTALL_DATA) DATA = $(hocrdoc_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src examples bindings docs EXTRA_DIST = \ Doxyfile HACKING pkgconfigdir = $(libdir)/pkgconfig @WITH_GTK_FALSE@pkgconfig_DATA = libhocr.pc @WITH_GTK_TRUE@pkgconfig_DATA = libhocr.pc libhocr-gtk.pc hocrdocdir = ${prefix}/share/doc/libhocr hocrdoc_DATA = \ README \ AUTHORS \ COPYING \ NEWS \ ChangeLog \ INSTALL \ HACKING all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) libhocr.pc: $(top_builddir)/config.status $(srcdir)/libhocr.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libhocr-gtk.pc: $(top_builddir)/config.status $(srcdir)/libhocr-gtk.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool install-hocrdocDATA: $(hocrdoc_DATA) @$(NORMAL_INSTALL) test -z "$(hocrdocdir)" || $(MKDIR_P) "$(DESTDIR)$(hocrdocdir)" @list='$(hocrdoc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(hocrdocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(hocrdocdir)/$$f'"; \ $(hocrdocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(hocrdocdir)/$$f"; \ done uninstall-hocrdocDATA: @$(NORMAL_UNINSTALL) @list='$(hocrdoc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(hocrdocdir)/$$f'"; \ rm -f "$(DESTDIR)$(hocrdocdir)/$$f"; \ done install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(hocrdocdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-hocrdocDATA install-pkgconfigDATA install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-hocrdocDATA uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ distclean distclean-generic distclean-libtool distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-hocrdocDATA install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-hocrdocDATA \ uninstall-pkgconfigDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/libhocr-gtk.pc.in0000644000175000017500000000043411051620121013347 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libhocr-gtk Description: A C library for hebrew optical character recognition (with GTK support) Version: @VERSION@ Requires: @requires_gtk@ Libs: -lhocr -lhocrgtk -lm Cflags: -I@pkgincludedir@ libhocr-0.10.17/aclocal.m40000644000175000017500000105120111043604646012067 00000000000000# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(AC_AUTOCONF_VERSION, [2.61],, [m4_warning([this file was generated for autoconf 2.61. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 52 Debian 1.5.26-4 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # -------------------------- # Check for some things on darwin AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi _LT_AC_TAGVAR(link_all_deplibs, $1)=no else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 1.5 are not dnl supported because the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5. m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0 python1.6 python1.5]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # hexversion has been introduced in Python 1.5.2; it's probably not # worth to support older versions (1.5.1 was released on October 31, 1998). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('$2', '.')) + [[0, 0, 0]] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR libhocr-0.10.17/bindings/0000777000175000017500000000000011051630066012102 500000000000000libhocr-0.10.17/bindings/Makefile.am0000644000175000017500000000002311017002615014040 00000000000000SUBDIRS = python libhocr-0.10.17/bindings/Makefile.in0000644000175000017500000003521011043604650014065 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = python all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bindings/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign bindings/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/bindings/python/0000777000175000017500000000000011051630066013423 500000000000000libhocr-0.10.17/bindings/python/Makefile.am0000644000175000017500000000131411051626434015376 00000000000000 EXTRA_DIST = hocr.i if WITH_PYTHON nodist_python_PYTHON = hocr.py nodist_pyexec_PYTHON = _hocr.so DEPS= $(top_builddir)/src/libhocr.la CLEANFILES = *.o *.cxx *.so *wrap* *.py all-am: _hocr.so if LINUX_HOST _hocr.so: hocr_wrap.cxx g++ -fPIC -c hocr_wrap.cxx $(PY_CFLAGS) -I$(top_srcdir)/src g++ -shared ../../src/.libs/libhocr.so hocr_wrap.o -o _hocr.so endif if DARWIN_HOST _hocr.so: hocr_wrap.cxx g++ -dynamic -fPIC -c hocr_wrap.cxx $(PY_CFLAGS) -I$(top_srcdir)/src g++ -bundle -bundle_loader $(prefix)/bin/python ../../src/.libs/libhocr.dylib hocr_wrap.o -o _hocr.so endif hocr_wrap.cxx: hocr.i swig -python -c++ -threads hocr.i install-exec-hook: chmod 755 $(DESTDIR)/$(pyexecdir)/_hocr.so endif libhocr-0.10.17/bindings/python/Makefile.in0000644000175000017500000003227111051626447015421 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings/python DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pythondir)" nodist_pyexecPYTHON_INSTALL = $(INSTALL_DATA) nodist_pythonPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/config/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = hocr.i @WITH_PYTHON_TRUE@nodist_python_PYTHON = hocr.py @WITH_PYTHON_TRUE@nodist_pyexec_PYTHON = _hocr.so @WITH_PYTHON_TRUE@DEPS = $(top_builddir)/src/libhocr.la @WITH_PYTHON_TRUE@CLEANFILES = *.o *.cxx *.so *wrap* *.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bindings/python/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign bindings/python/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_pyexecPYTHON: $(nodist_pyexec_PYTHON) @$(NORMAL_INSTALL) test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" @list='$(nodist_pyexec_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(nodist_pyexecPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pyexecdir)/$$f'"; \ $(nodist_pyexecPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pyexecdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyexecdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pyexecdir)" $$dlist; \ fi; \ else :; fi uninstall-nodist_pyexecPYTHON: @$(NORMAL_UNINSTALL) @list='$(nodist_pyexec_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ rm -f "$(DESTDIR)$(pyexecdir)/$${f}c"; \ rm -f "$(DESTDIR)$(pyexecdir)/$${f}o"; \ done install-nodist_pythonPYTHON: $(nodist_python_PYTHON) @$(NORMAL_INSTALL) test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)" @list='$(nodist_python_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(nodist_pythonPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pythondir)/$$f'"; \ $(nodist_pythonPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pythondir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythondir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythondir)" $$dlist; \ fi; \ else :; fi uninstall-nodist_pythonPYTHON: @$(NORMAL_UNINSTALL) @list='$(nodist_python_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(pythondir)/$$f"; \ rm -f "$(DESTDIR)$(pythondir)/$${f}c"; \ rm -f "$(DESTDIR)$(pythondir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: for dir in "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pythondir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @WITH_PYTHON_FALSE@install-exec-hook: clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-nodist_pythonPYTHON install-dvi: install-dvi-am install-exec-am: install-nodist_pyexecPYTHON @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nodist_pyexecPYTHON \ uninstall-nodist_pythonPYTHON .MAKE: install-am install-exec-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-exec-hook install-html \ install-html-am install-info install-info-am install-man \ install-nodist_pyexecPYTHON install-nodist_pythonPYTHON \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-nodist_pyexecPYTHON \ uninstall-nodist_pythonPYTHON @WITH_PYTHON_TRUE@all-am: _hocr.so @LINUX_HOST_TRUE@@WITH_PYTHON_TRUE@_hocr.so: hocr_wrap.cxx @LINUX_HOST_TRUE@@WITH_PYTHON_TRUE@ g++ -fPIC -c hocr_wrap.cxx $(PY_CFLAGS) -I$(top_srcdir)/src @LINUX_HOST_TRUE@@WITH_PYTHON_TRUE@ g++ -shared ../../src/.libs/libhocr.so hocr_wrap.o -o _hocr.so @DARWIN_HOST_TRUE@@WITH_PYTHON_TRUE@_hocr.so: hocr_wrap.cxx @DARWIN_HOST_TRUE@@WITH_PYTHON_TRUE@ g++ -dynamic -fPIC -c hocr_wrap.cxx $(PY_CFLAGS) -I$(top_srcdir)/src @DARWIN_HOST_TRUE@@WITH_PYTHON_TRUE@ g++ -bundle -bundle_loader $(prefix)/bin/python ../../src/.libs/libhocr.dylib hocr_wrap.o -o _hocr.so @WITH_PYTHON_TRUE@hocr_wrap.cxx: hocr.i @WITH_PYTHON_TRUE@ swig -python -c++ -threads hocr.i @WITH_PYTHON_TRUE@install-exec-hook: @WITH_PYTHON_TRUE@ chmod 755 $(DESTDIR)/$(pyexecdir)/_hocr.so # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/bindings/python/hocr.i0000644000175000017500000000155411042555714014457 00000000000000// file : hocr.i %module hocr %{ #include "../../src/hocrpp.h" %} %typemap(out) string_data { $result = PyString_FromStringAndSize($1.data,$1.size); } %include ../../src/ho_pixbuf.h %include ../../src/ho_array.h %include ../../src/ho_array_hist.h %include ../../src/ho_array_stat.h %include ../../src/ho_bitmap.h %include ../../src/ho_bitmap_hist.h %include ../../src/ho_objmap.h %include ../../src/ho_layout.h %include ../../src/ho_dimentions.h %include ../../src/ho_segment.h %include ../../src/ho_font.h %include ../../src/ho_recognize.h %include ../../src/ho_linguistics.h %include ../../src/ho_recognize_nikud.h %include ../../src/ho_string.h %include ../../src/hocr.h %include ../../src/hocrpp.h // on linux do: // swig -python -c++ hocr.i // g++ -fpic -c hocr_wrap.cxx -I/usr/include/python2.3 // g++ -shared .../../src/.libs/libhocr.so hocr_wrap.o -o _hocr.so libhocr-0.10.17/docs/0000777000175000017500000000000011051630066011235 500000000000000libhocr-0.10.17/docs/man/0000777000175000017500000000000011051630066012010 500000000000000libhocr-0.10.17/docs/man/Makefile.am0000644000175000017500000000002511017002615013750 00000000000000SUBDIRS = man1 man3 libhocr-0.10.17/docs/man/man3/0000777000175000017500000000000011051630066012646 500000000000000libhocr-0.10.17/docs/man/man3/ho_objlist.30000644000175000017500000000123711044261550015005 00000000000000.TH "ho_objlist" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME ho_objlist \- libhocr object list struct .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP .SS "Data Fields" .in +1c .ti -1c .RI "int \fBsize\fP" .br .ti -1c .RI "int \fBallocated_size\fP" .br .ti -1c .RI "\fBho_obj\fP * \fBobjects\fP" .br .in -1c .SH "Detailed Description" .PP libhocr object list struct .SH "Field Documentation" .PP .SS "int \fBho_objlist::size\fP" .PP .SS "int \fBho_objlist::allocated_size\fP" .PP .SS "\fBho_obj\fP* \fBho_objlist::objects\fP" .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_string.h.30000644000175000017500000000615111044261550015073 00000000000000.TH "src/ho_string.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_string.h \- libhocr C language header. .SH SYNOPSIS .br .PP .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBho_string\fP" .br .RI "\fIlibhocr string struct \fP" .in -1c .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_STRING_H\fP 1" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_string\fP * \fBho_string_new\fP ()" .br .RI "\fIcreats a new \fBho_string\fP struct \fP" .ti -1c .RI "int \fBho_string_free\fP (\fBho_string\fP *s_str)" .br .RI "\fIfree a hocr_text_buffer struct from memory \fP" .ti -1c .RI "int \fBho_string_cat\fP (\fBho_string\fP *s_str, const char *text)" .br .RI "\fIadd a string to hocr_text_buffer struct \fP" .ti -1c .RI "int \fBho_string_set\fP (\fBho_string\fP *s_str, const char *text)" .br .RI "\fIset a string to \fBho_string\fP struct \fP" .ti -1c .RI "char * \fBho_string_get\fP (const \fBho_string\fP *s_str)" .br .RI "\fIget the string of \fBho_string\fP struct \fP" .ti -1c .RI "\fBho_string\fP * \fBho_string_copy\fP (const \fBho_string\fP *s_str)" .br .RI "\fIcopy \fBho_string\fP struct \fP" .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_STRING_H 1" .PP .SH "Function Documentation" .PP .SS "\fBho_string\fP* ho_string_new ()" .PP creats a new \fBho_string\fP struct .PP \fBReturns:\fP .RS 4 pointer to a newly allocate \fBho_string\fP or null. .RE .PP .PP Referenced by hocr::Hocr::do_font_recognition(). .SS "int ho_string_free (\fBho_string\fP * s_str)" .PP free a hocr_text_buffer struct from memory .PP \fBParameters:\fP .RS 4 \fIs_str\fP pointer to \fBho_string\fP struct. .RE .PP \fBReturns:\fP .RS 4 1 .RE .PP .PP Referenced by hocr::Hocr::do_font_recognition(), hocr::Hocr::set_bitmap(), hocr::Hocr::set_pixbuf(), and hocr::Hocr::~Hocr(). .SS "int ho_string_cat (\fBho_string\fP * s_str, const char * text)" .PP add a string to hocr_text_buffer struct .PP \fBParameters:\fP .RS 4 \fIs_str\fP pointer to hocr_text_buffer struct. .br \fItext\fP pointer to the string to be added to the buffer. .RE .PP \fBReturns:\fP .RS 4 new size of text .RE .PP .SS "int ho_string_set (\fBho_string\fP * s_str, const char * text)" .PP set a string to \fBho_string\fP struct .PP \fBParameters:\fP .RS 4 \fIs_str\fP pointer to hocr_text_buffer struct. .br \fItext\fP pointer to the string to be set to the buffer. .RE .PP \fBReturns:\fP .RS 4 new size of text .RE .PP .SS "char* ho_string_get (const \fBho_string\fP * s_str)" .PP get the string of \fBho_string\fP struct .PP \fBParameters:\fP .RS 4 \fIs_str\fP pointer to hocr_text_buffer struct. .RE .PP \fBReturns:\fP .RS 4 pointer to a newly allocated string (use free to free it) .RE .PP .SS "\fBho_string\fP* ho_string_copy (const \fBho_string\fP * s_str)" .PP copy \fBho_string\fP struct .PP \fBParameters:\fP .RS 4 \fIs_str\fP pointer to hocr_text_buffer struct. .RE .PP \fBReturns:\fP .RS 4 new \fBho_string\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_bitmap.30000644000175000017500000000277311044261550014621 00000000000000.TH "ho_bitmap" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME ho_bitmap \- libhocr bitmap struct .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP .SS "Data Fields" .in +1c .ti -1c .RI "unsigned char \fBtype\fP" .br .ti -1c .RI "int \fBfont_height\fP" .br .ti -1c .RI "int \fBfont_width\fP" .br .ti -1c .RI "int \fBfont_spacing\fP" .br .ti -1c .RI "int \fBline_spacing\fP" .br .ti -1c .RI "int \fBavg_line_fill\fP" .br .ti -1c .RI "int \fBcom_line_fill\fP" .br .ti -1c .RI "unsigned char \fBnikud\fP" .br .ti -1c .RI "int \fBx\fP" .br .ti -1c .RI "int \fBy\fP" .br .ti -1c .RI "int \fBheight\fP" .br .ti -1c .RI "int \fBwidth\fP" .br .ti -1c .RI "int \fBrowstride\fP" .br .ti -1c .RI "unsigned char * \fBdata\fP" .br .in -1c .SH "Detailed Description" .PP libhocr bitmap struct .SH "Field Documentation" .PP .SS "unsigned char \fBho_bitmap::type\fP" .PP .SS "int \fBho_bitmap::font_height\fP" .PP .SS "int \fBho_bitmap::font_width\fP" .PP .SS "int \fBho_bitmap::font_spacing\fP" .PP .SS "int \fBho_bitmap::line_spacing\fP" .PP .SS "int \fBho_bitmap::avg_line_fill\fP" .PP .SS "int \fBho_bitmap::com_line_fill\fP" .PP .SS "unsigned char \fBho_bitmap::nikud\fP" .PP .SS "int \fBho_bitmap::x\fP" .PP .SS "int \fBho_bitmap::y\fP" .PP .SS "int \fBho_bitmap::height\fP" .PP .SS "int \fBho_bitmap::width\fP" .PP .SS "int \fBho_bitmap::rowstride\fP" .PP .SS "unsigned char* \fBho_bitmap::data\fP" .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_pixbuf.h.30000644000175000017500000006415711044261550015074 00000000000000.TH "src/ho_pixbuf.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_pixbuf.h \- libhocr C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBstring_data\fP" .br .RI "\fIhelper string struct for non-null-terminated strings \fP" .ti -1c .RI "struct \fBho_pixbuf\fP" .br .RI "\fIlibhocr pixbuf map struct (copy gtk pixbuf) \fP" .in -1c .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_PIXBUF_H\fP 1" .br .ti -1c .RI "#define \fBho_pixbuf_min3\fP(a, b, c) ((((a)<(b))&&((a)<(c))) ? (a) : (((b)<(c)) ? (b) : (c)))" .br .ti -1c .RI "#define \fBho_pixbuf_max3\fP(a, b, c) ((((a)>(b))&&((a)>(c))) ? (a) : (((b)>(c)) ? (b) : (c)))" .br .ti -1c .RI "#define \fBho_pixbuf_set\fP(m, x, y, col, val) (((m)->data)[(x)*(m)->n_channels+(y)*(m)->rowstride+(col)]=(val))" .br .ti -1c .RI "#define \fBho_pixbuf_get\fP(m, x, y, col) (((m)->data)[(x)*(m)->n_channels+(y)*(m)->rowstride+(col)])" .br .ti -1c .RI "#define \fBho_pixbuf_get_n_channels\fP(m) ((m)->n_channels)" .br .ti -1c .RI "#define \fBho_pixbuf_get_width\fP(m) ((m)->width)" .br .ti -1c .RI "#define \fBho_pixbuf_get_height\fP(m) ((m)->height)" .br .ti -1c .RI "#define \fBho_pixbuf_get_rowstride\fP(m) ((m)->rowstride)" .br .ti -1c .RI "#define \fBho_pixbuf_get_data\fP(m) ((m)->data)" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_new\fP (const unsigned char n_channels, const int width, const int height, const int rowstride)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_clone\fP (const \fBho_pixbuf\fP *m)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_clone_window\fP (const \fBho_pixbuf\fP *m, const int x, const int y, const int width, const int height)" .br .ti -1c .RI "int \fBho_pixbuf_set_data\fP (\fBho_pixbuf\fP *pix, const char *data)" .br .ti -1c .RI "\fBstring_data\fP \fBho_pixbuf_get_data_string\fP (\fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_new_from_bitmap\fP (const \fBho_bitmap\fP *bit_in)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_new_from_objmap\fP (const \fBho_objmap\fP *obj_in, const unsigned char min, const unsigned char max)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_new_from_layout\fP (const \fBho_layout\fP *lay_in, const unsigned char show_grid, const \fBho_bitmap\fP *m_text, const unsigned char text_block_r, const unsigned char text_block_g, const unsigned char text_block_b, const unsigned char text_block_a, const unsigned char text_block_frame_width, const unsigned char line_block_r, const unsigned char line_block_g, const unsigned char line_block_b, const unsigned char line_block_a, const unsigned char line_block_frame_width, const unsigned char word_block_r, const unsigned char word_block_g, const unsigned char word_block_b, const unsigned char word_block_a, const unsigned char word_block_frame_width, const unsigned char font_block_r, const unsigned char font_block_g, const unsigned char font_block_b, const unsigned char font_block_a, const unsigned char font_block_frame_width)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_to_rgb\fP (const \fBho_pixbuf\fP *pix_in)" .br .ti -1c .RI "int \fBho_pixbuf_free\fP (\fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_color_to_gray\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_color_to_red\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_color_to_green\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_color_to_blue\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_scale2\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_scale3\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_scale4\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_scale8\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_scale\fP (const \fBho_pixbuf\fP *pix, const unsigned char scale)" .br .ti -1c .RI "unsigned char \fBho_pixbuf_minmax\fP (const \fBho_pixbuf\fP *pix, unsigned char *min, unsigned char *max)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_linear_filter\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_pixbuf_to_bitmap\fP (const \fBho_pixbuf\fP *pix, unsigned char threshold)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_pixbuf_to_bitmap_by_color\fP (const \fBho_pixbuf\fP *pix, unsigned char min_red, unsigned char max_red, unsigned char min_green, unsigned char max_green, unsigned char min_blue, unsigned char max_blue)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_pixbuf_to_bitmap_adaptive\fP (const \fBho_pixbuf\fP *pix, unsigned char threshold, unsigned char size, unsigned char adaptive_threshold)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_pixbuf_to_bitmap_adaptive_fine\fP (const \fBho_pixbuf\fP *pix, unsigned char threshold, unsigned char size, unsigned char adaptive_threshold)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_pixbuf_to_bitmap_wrapper\fP (const \fBho_pixbuf\fP *pix_in, const unsigned char scale, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, const unsigned char size)" .br .ti -1c .RI "int \fBho_pixbuf_draw_line\fP (\fBho_pixbuf\fP *m, const int x1, const int y1, const int x2, const int y2, const unsigned char red, const unsigned char green, const unsigned char blue)" .br .ti -1c .RI "int \fBho_pixbuf_draw_box\fP (\fBho_pixbuf\fP *m, const int x, const int y, const int width, const int height, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha)" .br .ti -1c .RI "int \fBho_pixbuf_draw_box_empty\fP (\fBho_pixbuf\fP *m, const int x, const int y, const int width, const int height, const unsigned char red, const unsigned char green, const unsigned char blue)" .br .ti -1c .RI "int \fBho_pixbuf_draw_horizontal_scale\fP (\fBho_pixbuf\fP *m, const int x1, const int y1, const int length, const int step, const unsigned char red, const unsigned char green, const unsigned char blue)" .br .ti -1c .RI "int \fBho_pixbuf_draw_vertical_scale\fP (\fBho_pixbuf\fP *m, const int x1, const int y1, const int length, const int step, const unsigned char red, const unsigned char green, const unsigned char blue)" .br .ti -1c .RI "int \fBho_pixbuf_draw_grid\fP (\fBho_pixbuf\fP *m, const int size, const int step, const unsigned char red, const unsigned char green, const unsigned char blue)" .br .ti -1c .RI "int \fBho_pixbuf_draw_bitmap\fP (\fBho_pixbuf\fP *m, const \fBho_bitmap\fP *bit_in, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha)" .br .ti -1c .RI "int \fBho_pixbuf_draw_rgb_bitmap\fP (\fBho_pixbuf\fP *m, const \fBho_bitmap\fP *bit_in_red, const \fBho_bitmap\fP *bit_in_green, const \fBho_bitmap\fP *bit_in_blue)" .br .ti -1c .RI "int \fBho_pixbuf_draw_rgb_pixbufs\fP (\fBho_pixbuf\fP *m, const \fBho_pixbuf\fP *bit_in_red, const \fBho_pixbuf\fP *bit_in_green, const \fBho_pixbuf\fP *bit_in_blue)" .br .ti -1c .RI "int \fBho_pixbuf_draw_bitmap_at\fP (\fBho_pixbuf\fP *m, const \fBho_bitmap\fP *bit_in, const int x1, const int y1, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_pnm_load\fP (const char *filename)" .br .ti -1c .RI "int \fBho_pixbuf_pnm_save\fP (const \fBho_pixbuf\fP *pix, const char *filename)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_pixbuf_bw_tiff_load\fP (const char *filename)" .br .ti -1c .RI "int \fBho_pixbuf_bw_tiff_save\fP (const \fBho_pixbuf\fP *pix, const char *filename)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_PIXBUF_H 1" .PP .SS "#define ho_pixbuf_min3(a, b, c) ((((a)<(b))&&((a)<(c))) ? (a) : (((b)<(c)) ? (b) : (c)))" .PP .SS "#define ho_pixbuf_max3(a, b, c) ((((a)>(b))&&((a)>(c))) ? (a) : (((b)>(c)) ? (b) : (c)))" .PP .SS "#define ho_pixbuf_set(m, x, y, col, val) (((m)->data)[(x)*(m)->n_channels+(y)*(m)->rowstride+(col)]=(val))" .PP .SS "#define ho_pixbuf_get(m, x, y, col) (((m)->data)[(x)*(m)->n_channels+(y)*(m)->rowstride+(col)])" .PP .SS "#define ho_pixbuf_get_n_channels(m) ((m)->n_channels)" .PP .SS "#define ho_pixbuf_get_width(m) ((m)->width)" .PP .SS "#define ho_pixbuf_get_height(m) ((m)->height)" .PP .SS "#define ho_pixbuf_get_rowstride(m) ((m)->rowstride)" .PP .SS "#define ho_pixbuf_get_data(m) ((m)->data)" .PP .SH "Function Documentation" .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_new (const unsigned char n_channels, const int width, const int height, const int rowstride)" .PP new \fBho_pixbuf\fP .PP \fBParameters:\fP .RS 4 \fIn_channels\fP number of color channels .br \fIheight\fP hight of pixbuf in pixels .br \fIwidth\fP width of pixbuf in pixels .br \fIrowstride\fP number of bytes in a row .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_clone (const \fBho_pixbuf\fP * m)" .PP clone \fBho_pixbuf\fP .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to a \fBho_pixbuf\fP image .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_clone_window (const \fBho_pixbuf\fP * m, const int x, const int y, const int width, const int height)" .PP clone \fBho_pixbuf\fP window .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to a \fBho_pixbuf\fP image .br \fIx\fP x-start of window .br \fIy\fP y-start of window .br \fIwidth\fP width of window .br \fIheight\fP height of window .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "int ho_pixbuf_set_data (\fBho_pixbuf\fP * pix, const char * data)" .PP copy pixel date to a \fBho_pixbuf\fP .PP \fBParameters:\fP .RS 4 \fIpix\fP pointer to a \fBho_pixbuf\fP image .br \fIdata\fP the pixel data to copy .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBstring_data\fP ho_pixbuf_get_data_string (\fBho_pixbuf\fP * pix)" .PP get pixel date to a \fBho_pixbuf\fP as a string .PP \fBParameters:\fP .RS 4 \fIpix\fP pointer to a \fBho_pixbuf\fP image .br \fIa\fP string data struct of the pixbuf data .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_new_from_bitmap (const \fBho_bitmap\fP * bit_in)" .PP new \fBho_pixbuf\fP from \fBho_bitmap\fP .PP \fBParameters:\fP .RS 4 \fIbit_in\fP pointer to an \fBho_bitmap\fP image .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .PP Referenced by hocr::Hocr::get_bitmap_pixbuf(). .SS "\fBho_pixbuf\fP* ho_pixbuf_new_from_objmap (const \fBho_objmap\fP * obj_in, const unsigned char min, const unsigned char max)" .PP new \fBho_pixbuf\fP from \fBho_objmap\fP .PP \fBParameters:\fP .RS 4 \fIobj_in\fP pointer to an \fBho_objmap\fP image .br \fImin\fP minimal color value .br \fImax\fP maximal color value .RE .PP \fBReturns:\fP .RS 4 newly allocated color \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_new_from_layout (const \fBho_layout\fP * lay_in, const unsigned char show_grid, const \fBho_bitmap\fP * m_text, const unsigned char text_block_r, const unsigned char text_block_g, const unsigned char text_block_b, const unsigned char text_block_a, const unsigned char text_block_frame_width, const unsigned char line_block_r, const unsigned char line_block_g, const unsigned char line_block_b, const unsigned char line_block_a, const unsigned char line_block_frame_width, const unsigned char word_block_r, const unsigned char word_block_g, const unsigned char word_block_b, const unsigned char word_block_a, const unsigned char word_block_frame_width, const unsigned char font_block_r, const unsigned char font_block_g, const unsigned char font_block_b, const unsigned char font_block_a, const unsigned char font_block_frame_width)" .PP new \fBho_pixbuf\fP from \fBho_layout\fP .PP \fBParameters:\fP .RS 4 \fIlay_in\fP pointer to an \fBho_layout\fP image .br \fIshow_grid\fP show grid on output .br \fIm_text\fP text to draw on output .br \fItext_block_r\fP red channel of text block .br \fItext_block_g\fP green channel of text block .br \fItext_block_b\fP blue channel of text block .br \fItext_block_a\fP alfa channel of text block .br \fItext_block_frame_width\fP frame width of text block .br \fIline_block_r\fP red channel of line block .br \fIline_block_g\fP green channel of line block .br \fIline_block_b\fP blue channel of line block .br \fIline_block_a\fP alfa channel of line block .br \fIline_block_frame_width\fP frame line of text block .br \fIword_block_r\fP red channel of word block .br \fIword_block_g\fP green channel of word block .br \fIword_block_b\fP blue channel of word block .br \fIword_block_a\fP alfa channel of word block .br \fIword_block_frame_width\fP frame width of word block .br \fIfont_block_r\fP red channel of font block .br \fIfont_block_g\fP green channel of font block .br \fIfont_block_b\fP blue channel of font block .br \fIfont_block_a\fP alfa channel of font block .br \fIfont_block_frame_width\fP frame width of font block .RE .PP \fBReturns:\fP .RS 4 newly allocated color \fBho_pixbuf\fP .RE .PP .PP Referenced by hocr::Hocr::get_layout_pixbuf(). .SS "\fBho_pixbuf\fP* ho_pixbuf_to_rgb (const \fBho_pixbuf\fP * pix_in)" .PP new rgb \fBho_pixbuf\fP from non rgb pixbuf .PP \fBParameters:\fP .RS 4 \fIpix_in\fP pointer the original pixbuf .RE .PP \fBReturns:\fP .RS 4 newly allocated rgb color \fBho_pixbuf\fP .RE .PP .PP Referenced by hocr::Hocr::get_bitmap_pixbuf(). .SS "int ho_pixbuf_free (\fBho_pixbuf\fP * pix)" .PP free an \fBho_pixbuf\fP .PP \fBParameters:\fP .RS 4 \fIpix\fP pointer to an \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .PP Referenced by hocr::Hocr::get_bitmap_pixbuf(), hocr::Hocr::set_bitmap(), hocr::Hocr::set_pixbuf(), and hocr::Hocr::~Hocr(). .SS "\fBho_pixbuf\fP* ho_pixbuf_color_to_gray (const \fBho_pixbuf\fP * pix)" .PP converts a color pixbuf to gray one .PP \fBParameters:\fP .RS 4 \fIpix\fP the color \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_color_to_red (const \fBho_pixbuf\fP * pix)" .PP take the Red channel from an RGB pixbuf .PP \fBParameters:\fP .RS 4 \fIpix\fP the color \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_color_to_green (const \fBho_pixbuf\fP * pix)" .PP take the Green channel from an RGB pixbuf .PP \fBParameters:\fP .RS 4 \fIpix\fP the color \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_color_to_blue (const \fBho_pixbuf\fP * pix)" .PP take the Blue channel from an RGB pixbuf .PP \fBParameters:\fP .RS 4 \fIpix\fP the color \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_scale2 (const \fBho_pixbuf\fP * pix)" .PP scale a gray pixbuf to by 2 .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_scale3 (const \fBho_pixbuf\fP * pix)" .PP scale a gray pixbuf to by 3 .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_scale4 (const \fBho_pixbuf\fP * pix)" .PP scale a gray pixbuf to by 4 .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_scale8 (const \fBho_pixbuf\fP * pix)" .PP scale a gray pixbuf to by 8 .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_scale (const \fBho_pixbuf\fP * pix, const unsigned char scale)" .PP scale a gray pixbuf .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .br \fIscale\fP scale by this factor .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "unsigned char ho_pixbuf_minmax (const \fBho_pixbuf\fP * pix, unsigned char * min, unsigned char * max)" .PP get the min and max values in a gray pixbuf .PP \fBParameters:\fP .RS 4 \fIpix\fP gray \fBho_pixbuf\fP .br \fImin\fP a pointer to return the min .br \fImax\fP a pointer to return the max .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_linear_filter (const \fBho_pixbuf\fP * pix)" .PP aplay a linear filter to a gray pixbuf .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_bitmap\fP* ho_pixbuf_to_bitmap (const \fBho_pixbuf\fP * pix, unsigned char threshold)" .PP convert a color or gray pixbuf to bitmap .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .br \fIthreshold\fP the threshold to use 0..100 .RE .PP \fBReturns:\fP .RS 4 newly allocated b/w \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_pixbuf_to_bitmap_by_color (const \fBho_pixbuf\fP * pix, unsigned char min_red, unsigned char max_red, unsigned char min_green, unsigned char max_green, unsigned char min_blue, unsigned char max_blue)" .PP convert a color or gray pixbuf to bitmap .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .br \fImin_red\fP the min threshold for red channel .br \fImax_red\fP the max threshold for red channel .br \fImin_green\fP the min threshold for green channel .br \fImax_gren\fP the max threshold for green channel .br \fImin_blue\fP the min threshold for blue channel .br \fImax_blue\fP the max threshold for blue channel .RE .PP \fBReturns:\fP .RS 4 newly allocated b/w \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_pixbuf_to_bitmap_adaptive (const \fBho_pixbuf\fP * pix, unsigned char threshold, unsigned char size, unsigned char adaptive_threshold)" .PP convert a gray pixbuf to bitmap using adaptive thresholding .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .br \fIthreshold\fP the threshold to use 0..100 .br \fIsize\fP block size for the adaptive steps .br \fIadaptive_threshold\fP the threshold to use for adaptive thresholding 0..100 .RE .PP \fBReturns:\fP .RS 4 newly allocated b/w \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_pixbuf_to_bitmap_adaptive_fine (const \fBho_pixbuf\fP * pix, unsigned char threshold, unsigned char size, unsigned char adaptive_threshold)" .PP convert a gray pixbuf to bitmap using better adaptive thresholding .PP \fBParameters:\fP .RS 4 \fIpix\fP the input \fBho_pixbuf\fP .br \fIthreshold\fP the threshold to use 0..100 .br \fIsize\fP block size for the adaptive steps .br \fIadaptive_threshold\fP the threshold to use for adaptive thresholding 0..100 .RE .PP \fBReturns:\fP .RS 4 newly allocated b/w \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_pixbuf_to_bitmap_wrapper (const \fBho_pixbuf\fP * pix_in, const unsigned char scale, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, const unsigned char size)" .PP convert a color of gray pixbuf to bitmap wrapper function .PP \fBParameters:\fP .RS 4 \fIpix_in\fP the input \fBho_pixbuf\fP .br \fIscale\fP the scale to use .br \fIadaptive\fP what type of thresholding to use. 0-normal,1-no,2-fine. .br \fIthreshold\fP the threshold to use 0..100 .br \fIa_threshold\fP the threshold to use for adaptive thresholding 0..100 .br \fIsize\fP kernel size to use for adaptive thresholding .RE .PP \fBReturns:\fP .RS 4 newly allocated b/w \fBho_bitmap\fP .RE .PP .SS "int ho_pixbuf_draw_line (\fBho_pixbuf\fP * m, const int x1, const int y1, const int x2, const int y2, const unsigned char red, const unsigned char green, const unsigned char blue)" .PP draw a line from x1,y1 to x2,y2 .PP \fBParameters:\fP .RS 4 \fIm\fP a \fBho_pixbuf\fP .br \fIx1\fP x cordinate of start point .br \fIy1\fP y cordinate of start point .br \fIx2\fP x cordinate of end point .br \fIy2\fP y cordinate of end point .br \fIred\fP value of red channel .br \fIgreen\fP value of green channel .br \fIblue\fP value of blue channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_pixbuf_draw_box (\fBho_pixbuf\fP * m, const int x, const int y, const int width, const int height, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha)" .PP draw a box on pixbuf .PP \fBParameters:\fP .RS 4 \fIm\fP the pixbuf to draw on .br \fIx\fP x-start of box .br \fIy\fP y-start of box .br \fIwidth\fP width of box .br \fIheight\fP height of box .br \fIred\fP value of red channel .br \fIgreen\fP value of green channel .br \fIblue\fP value of blue channel .br \fIalpha\fP value of alpha channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_pixbuf_draw_box_empty (\fBho_pixbuf\fP * m, const int x, const int y, const int width, const int height, const unsigned char red, const unsigned char green, const unsigned char blue)" .PP draw an empty box on pixbuf .PP \fBParameters:\fP .RS 4 \fIm\fP the pixbuf to draw on .br \fIx\fP x-start of box .br \fIy\fP y-start of box .br \fIwidth\fP width of box .br \fIheight\fP height of box .br \fIred\fP value of red channel .br \fIgreen\fP value of green channel .br \fIblue\fP value of blue channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_pixbuf_draw_horizontal_scale (\fBho_pixbuf\fP * m, const int x1, const int y1, const int length, const int step, const unsigned char red, const unsigned char green, const unsigned char blue)" .PP draw a scale line from x1,y1 .PP \fBParameters:\fP .RS 4 \fIm\fP a \fBho_pixbuf\fP .br \fIx1\fP x cordinate of start point .br \fIy1\fP y cordinate of start point .br \fIlength\fP length of scale line .br \fIstep\fP size of scale marks .br \fIred\fP value of red channel .br \fIgreen\fP value of green channel .br \fIblue\fP value of blue channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_pixbuf_draw_vertical_scale (\fBho_pixbuf\fP * m, const int x1, const int y1, const int length, const int step, const unsigned char red, const unsigned char green, const unsigned char blue)" .PP draw a scale line from x1,y1 .PP \fBParameters:\fP .RS 4 \fIm\fP a \fBho_pixbuf\fP .br \fIx1\fP x cordinate of start point .br \fIy1\fP y cordinate of start point .br \fIlength\fP length of scale line .br \fIstep\fP size of scale marks .br \fIred\fP value of red channel .br \fIgreen\fP value of green channel .br \fIblue\fP value of blue channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_pixbuf_draw_grid (\fBho_pixbuf\fP * m, const int size, const int step, const unsigned char red, const unsigned char green, const unsigned char blue)" .PP draw a grid .PP \fBParameters:\fP .RS 4 \fIm\fP a \fBho_pixbuf\fP .br \fIsize\fP size of grid boxes .br \fIstep\fP size of scale marks .br \fIred\fP value of red channel .br \fIgreen\fP value of green channel .br \fIblue\fP value of blue channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_pixbuf_draw_bitmap (\fBho_pixbuf\fP * m, const \fBho_bitmap\fP * bit_in, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha)" .PP draw a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP a \fBho_pixbuf\fP .br \fIbit_in\fP the bitmap to draw on the pixbuf .br \fIred\fP value of red channel .br \fIgreen\fP value of green channel .br \fIblue\fP value of blue channel .br \fIalpha\fP value of alpha channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_pixbuf_draw_rgb_bitmap (\fBho_pixbuf\fP * m, const \fBho_bitmap\fP * bit_in_red, const \fBho_bitmap\fP * bit_in_green, const \fBho_bitmap\fP * bit_in_blue)" .PP draw RGB bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP a \fBho_pixbuf\fP .br \fIbit_in_red\fP the bitmap to draw on the pixbuf red channel .br \fIbit_in_green\fP the bitmap to draw on the pixbuf green channel .br \fIbit_in_blue\fP the bitmap to draw on the pixbuf blue channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_pixbuf_draw_rgb_pixbufs (\fBho_pixbuf\fP * m, const \fBho_pixbuf\fP * bit_in_red, const \fBho_pixbuf\fP * bit_in_green, const \fBho_pixbuf\fP * bit_in_blue)" .PP draw RGB pixbufs .PP \fBParameters:\fP .RS 4 \fIm\fP a \fBho_pixbuf\fP .br \fIbit_in_red\fP the grey pixbuf to draw on the pixbuf red channel .br \fIbit_in_green\fP the grey pixbuf to draw on the pixbuf green channel .br \fIbit_in_blue\fP the grey pixbuf to draw on the pixbuf blue channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_pixbuf_draw_bitmap_at (\fBho_pixbuf\fP * m, const \fBho_bitmap\fP * bit_in, const int x1, const int y1, const unsigned char red, const unsigned char green, const unsigned char blue, const unsigned char alpha)" .PP draw a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP a \fBho_pixbuf\fP .br \fIbit_in\fP the bitmap to draw on the pixbuf .br \fIx1\fP x of upper right start of drawing .br \fIy1\fP y of upper right start of drawing .br \fIred\fP value of red channel .br \fIgreen\fP value of green channel .br \fIblue\fP value of blue channel .br \fIalpha\fP value of alpha channel .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_pnm_load (const char * filename)" .PP read \fBho_pixbuf\fP from pnm file 8 or 24 bpp .PP \fBParameters:\fP .RS 4 \fIfilename\fP file name of pnm file .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_pixbuf\fP .RE .PP .SS "int ho_pixbuf_pnm_save (const \fBho_pixbuf\fP * pix, const char * filename)" .PP writes \fBho_pixbuf\fP to pnm file .PP \fBParameters:\fP .RS 4 \fIpix\fP \fBho_pixbuf\fP 8 or 24 bpp .br \fIfilename\fP save as file name .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_pixbuf\fP* ho_pixbuf_bw_tiff_load (const char * filename)" .PP read \fBho_pixbuf\fP from a b/w tiff file .PP \fBParameters:\fP .RS 4 \fIfilename\fP file name of tiff file .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "int ho_pixbuf_bw_tiff_save (const \fBho_pixbuf\fP * pix, const char * filename)" .PP writes \fBho_pixbuf\fP to a black and white tiff file .PP \fBParameters:\fP .RS 4 \fIpix\fP \fBho_pixbuf\fP 8 or 24 bpp .br \fIfilename\fP save as file name .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_layout.30000644000175000017500000000440111044261550014650 00000000000000.TH "ho_layout" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME ho_layout \- libhocr layout struct .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP .SS "Data Fields" .in +1c .ti -1c .RI "char \fBfont_spacing_code\fP" .br .ti -1c .RI "unsigned char \fBtype\fP" .br .ti -1c .RI "unsigned char \fBdir\fP" .br .ti -1c .RI "int \fBnumber_of_fonts\fP" .br .ti -1c .RI "\fBho_bitmap\fP * \fBm_page_text\fP" .br .ti -1c .RI "\fBho_bitmap\fP * \fBm_page_blocks_mask\fP" .br .ti -1c .RI "int \fBn_blocks\fP" .br .ti -1c .RI "\fBho_bitmap\fP ** \fBm_blocks_text\fP" .br .ti -1c .RI "\fBho_bitmap\fP ** \fBm_blocks_lines_mask\fP" .br .ti -1c .RI "int * \fBn_lines\fP" .br .ti -1c .RI "\fBho_bitmap\fP *** \fBm_lines_text\fP" .br .ti -1c .RI "\fBho_bitmap\fP *** \fBm_lines_line_mask\fP" .br .ti -1c .RI "\fBho_bitmap\fP *** \fBm_lines_words_mask\fP" .br .ti -1c .RI "int ** \fBn_words\fP" .br .ti -1c .RI "\fBho_bitmap\fP **** \fBm_words_text\fP" .br .ti -1c .RI "\fBho_bitmap\fP **** \fBm_words_line_mask\fP" .br .ti -1c .RI "\fBho_bitmap\fP **** \fBm_words_font_mask\fP" .br .ti -1c .RI "int *** \fBn_fonts\fP" .br .in -1c .SH "Detailed Description" .PP libhocr layout struct .SH "Field Documentation" .PP .SS "char \fBho_layout::font_spacing_code\fP" .PP .SS "unsigned char \fBho_layout::type\fP" .PP .SS "unsigned char \fBho_layout::dir\fP" .PP .SS "int \fBho_layout::number_of_fonts\fP" .PP .SS "\fBho_bitmap\fP* \fBho_layout::m_page_text\fP" .PP .SS "\fBho_bitmap\fP* \fBho_layout::m_page_blocks_mask\fP" .PP .SS "int \fBho_layout::n_blocks\fP" .PP .SS "\fBho_bitmap\fP** \fBho_layout::m_blocks_text\fP" .PP .SS "\fBho_bitmap\fP** \fBho_layout::m_blocks_lines_mask\fP" .PP .SS "int* \fBho_layout::n_lines\fP" .PP .SS "\fBho_bitmap\fP*** \fBho_layout::m_lines_text\fP" .PP .SS "\fBho_bitmap\fP*** \fBho_layout::m_lines_line_mask\fP" .PP .SS "\fBho_bitmap\fP*** \fBho_layout::m_lines_words_mask\fP" .PP .SS "int** \fBho_layout::n_words\fP" .PP .SS "\fBho_bitmap\fP**** \fBho_layout::m_words_text\fP" .PP .SS "\fBho_bitmap\fP**** \fBho_layout::m_words_line_mask\fP" .PP .SS "\fBho_bitmap\fP**** \fBho_layout::m_words_font_mask\fP" .PP .SS "int*** \fBho_layout::n_fonts\fP" .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_segment.h.30000644000175000017500000001446411044261550015235 00000000000000.TH "src/ho_segment.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_segment.h \- libhocr C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_SEGMENT_H\fP 1" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_bitmap\fP * \fBho_segment_paragraphs_fine\fP (const \fBho_bitmap\fP *m, const unsigned char box, const double font_height_factor_min, const double font_height_factor_max, const double font_width_factor_min, const double font_width_factor_max, const double horizontal_link_factor, const double vertical_link_factor)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_segment_paragraphs\fP (const \fBho_bitmap\fP *m, const unsigned char box)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_segment_lines_fine\fP (const \fBho_bitmap\fP *m, const double font_height_factor_min, const double font_height_factor_max, const double font_width_factor_min, const double font_width_factor_max, const double link_arg, const double link_arg_2, const double extend_arg, const double extend_arg_2, const double erode_arg)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_segment_lines\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_segment_words_fine\fP (const \fBho_bitmap\fP *m, const \fBho_bitmap\fP *m_line_map, const double horizontal_link_factor, const double top_frame_factor, const double bottom_frame_factor)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_segment_words\fP (const \fBho_bitmap\fP *m, const \fBho_bitmap\fP *m_line_map, const char font_spacing_code)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_segment_fonts\fP (const \fBho_bitmap\fP *m, const \fBho_bitmap\fP *m_line_map, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_SEGMENT_H 1" .PP .SH "Function Documentation" .PP .SS "\fBho_bitmap\fP* ho_segment_paragraphs_fine (const \fBho_bitmap\fP * m, const unsigned char box, const double font_height_factor_min, const double font_height_factor_max, const double font_width_factor_min, const double font_width_factor_max, const double horizontal_link_factor, const double vertical_link_factor)" .PP return a bitmap of the paragraphs, font and line dimentions _must_ be set .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIbox\fP squre (boxes) or free formed text blocks .br \fIfont_height_factor_min\fP filter objects height min .br \fIfont_height_factor_max\fP filter objects height max .br \fIfont_width_factor_min\fP filter objects width min .br \fIfont_width_factor_max\fP filter objects width max .br \fIhorizontal_link_factor\fP link horizontaly factor .br \fIvertical_link_factor\fP link verticaly factor .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_segment_paragraphs (const \fBho_bitmap\fP * m, const unsigned char box)" .PP return a bitmap of the paragraphs, font and line dimentions _must_ be set .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIbox\fP squre (boxes) or free formed text blocks .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_segment_lines_fine (const \fBho_bitmap\fP * m, const double font_height_factor_min, const double font_height_factor_max, const double font_width_factor_min, const double font_width_factor_max, const double link_arg, const double link_arg_2, const double extend_arg, const double extend_arg_2, const double erode_arg)" .PP return a bitmap of the lines .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIfont_height_factor_min\fP filter objects height min .br \fIfont_height_factor_max\fP filter objects height max .br \fIfont_width_factor_min\fP filter objects width min .br \fIfont_width_factor_max\fP filter objects width max .br \fIlink_arg\fP factor for linking letters in line .br \fIlink_arg_2\fP factor for linking letters in line .br \fIextend_arg\fP factor for extemding lines horizontaly .br \fIextend_arg_2\fP factor for extemding lines horizontaly .br \fIerode_arg\fP factor for eroding line sourface .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_segment_lines (const \fBho_bitmap\fP * m)" .PP return a bitmap of the lines .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_segment_words_fine (const \fBho_bitmap\fP * m, const \fBho_bitmap\fP * m_line_map, const double horizontal_link_factor, const double top_frame_factor, const double bottom_frame_factor)" .PP return a bitmap of the words .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP of line .br \fIm_line_map\fP pointer to an \fBho_bitmap\fP of line box .br \fIhorizontal_link_factor\fP horizontal link factor .br \fItop_frame_factor\fP top frame factor .br \fIbottom_frame_factor\fP bottom frame factor .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_segment_words (const \fBho_bitmap\fP * m, const \fBho_bitmap\fP * m_line_map, const char font_spacing_code)" .PP return a bitmap of the words .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP of text .br \fIm_line_map\fP pointer to an \fBho_bitmap\fP of line .br \fIfont_spacing_code\fP -1:tight 0:normal 1:spaced fonts .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_segment_fonts (const \fBho_bitmap\fP * m, const \fBho_bitmap\fP * m_line_map, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway)" .PP return a bitmap of the interfont spaces .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP of text .br \fIm_line_map\fP pointer to an \fBho_bitmap\fP of line .br \fIslicing_threshold\fP percent of line fill declared space between fonts .br \fIslicing_width\fP percent of font width above try to choop font in two .br \fIline_leeway\fP percent of line height to use above and below line .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_pixbuf.30000644000175000017500000000153611044261550014636 00000000000000.TH "ho_pixbuf" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME ho_pixbuf \- libhocr pixbuf map struct (copy gtk pixbuf) .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP .SS "Data Fields" .in +1c .ti -1c .RI "unsigned char \fBn_channels\fP" .br .ti -1c .RI "int \fBheight\fP" .br .ti -1c .RI "int \fBwidth\fP" .br .ti -1c .RI "int \fBrowstride\fP" .br .ti -1c .RI "unsigned char * \fBdata\fP" .br .in -1c .SH "Detailed Description" .PP libhocr pixbuf map struct (copy gtk pixbuf) .SH "Field Documentation" .PP .SS "unsigned char \fBho_pixbuf::n_channels\fP" .PP .SS "int \fBho_pixbuf::height\fP" .PP .SS "int \fBho_pixbuf::width\fP" .PP .SS "int \fBho_pixbuf::rowstride\fP" .PP .SS "unsigned char* \fBho_pixbuf::data\fP" .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_string.30000644000175000017500000000124411044261550014643 00000000000000.TH "ho_string" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME ho_string \- libhocr string struct .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP .SS "Data Fields" .in +1c .ti -1c .RI "char * \fBstring\fP" .br .ti -1c .RI "int \fBsize\fP" .br .ti -1c .RI "int \fBallocated_size\fP" .br .in -1c .SH "Detailed Description" .PP libhocr string struct .SH "Field Documentation" .PP .SS "char* \fBho_string::string\fP" .PP Referenced by hocr::Hocr::get_text(). .SS "int \fBho_string::size\fP" .PP .SS "int \fBho_string::allocated_size\fP" .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/hocr.h.30000644000175000017500000001702411044261550014033 00000000000000.TH "src/hocr.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/hocr.h \- libhocr main C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br .SS "Defines" .in +1c .ti -1c .RI "#define \fBHOCR_H\fP 1" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_bitmap\fP * \fBhocr_image_processing\fP (const \fBho_pixbuf\fP *pix_in, const unsigned char scale, const unsigned char no_auto_scale, double rotate, const unsigned char no_auto_rotate, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, int *progress)" .br .ti -1c .RI "\fBho_layout\fP * \fBhocr_layout_analysis\fP (const \fBho_bitmap\fP *m_in, const int font_spacing_code, const int paragraph_setup, const int slicing_threshold, const int slicing_width, const int line_leeway, const unsigned char dir_ltr, int *progress)" .br .ti -1c .RI "int \fBhocr_font_recognition\fP (const \fBho_layout\fP *l_page, \fBho_string\fP *s_text_out, const unsigned char html, int font_code, const unsigned char nikud, unsigned char do_linguistics, int *progress)" .br .ti -1c .RI "int \fBhocr_do_ocr_fine\fP (const \fBho_pixbuf\fP *pix_in, \fBho_string\fP *s_text_out, const unsigned char scale, const unsigned char no_auto_scale, double rotate, const unsigned char no_auto_rotate, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, const int font_spacing_code, const int paragraph_setup, const int slicing_threshold, const int slicing_width, const int line_leeway, const unsigned char dir_ltr, const unsigned char html, int font_code, const unsigned char nikud, const unsigned char do_linguistics, int *progress)" .br .ti -1c .RI "int \fBhocr_do_ocr\fP (const \fBho_pixbuf\fP *pix_in, \fBho_string\fP *s_text_out, const unsigned char html, int font_code, const unsigned char do_linguistics, int *progress)" .br .ti -1c .RI "const char * \fBhocr_get_build_string\fP ()" .br .ti -1c .RI "const char * \fBhocr_get_version_string\fP ()" .br .in -1c .SH "Detailed Description" .PP libhocr main C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HOCR_H 1" .PP .SH "Function Documentation" .PP .SS "\fBho_bitmap\fP* hocr_image_processing (const \fBho_pixbuf\fP * pix_in, const unsigned char scale, const unsigned char no_auto_scale, double rotate, const unsigned char no_auto_rotate, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, int * progress)" .PP convert a gray pixbuf to bitmap .PP \fBParameters:\fP .RS 4 \fIpix_in\fP the input \fBho_pixbuf\fP .br \fIscale\fP the scale to use .br \fIno_auto_scale\fP do not try to autoscale .br \fIrotate\fP the rotation angle to use .br \fIno_auto_rotate\fP do not try to autorotate .br \fIadaptive\fP what type of thresholding to use. 0-normal,1-no,2-fine. .br \fIthreshold\fP the threshold to use 0..100 (0-auto) .br \fIa_threshold\fP the threshold to use for adaptive thresholding 0..100 (0-auto) .br \fIprogress\fP a progress indicator 0..100 .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_bitmap\fP .RE .PP .PP Referenced by hocr::Hocr::do_image_processing(). .SS "\fBho_layout\fP* hocr_layout_analysis (const \fBho_bitmap\fP * m_in, const int font_spacing_code, const int paragraph_setup, const int slicing_threshold, const int slicing_width, const int line_leeway, const unsigned char dir_ltr, int * progress)" .PP new \fBho_layout\fP .PP \fBParameters:\fP .RS 4 \fIm_in\fP a pointer to a text bitmap .br \fIfont_spacing_code\fP -3 tight .. 0 .. 3 spaced .br \fIparagraph_setup\fP free text blocks or boxed in columns .br \fIslicing_threshold\fP percent of line fill to cut fonts .br \fIslicing_width\fP what is a wide font .br \fIdir\fP true-ltr false-rtl .br \fIprogress\fP a progress indicator 0..100 .RE .PP \fBReturns:\fP .RS 4 a newly allocated and filled layout .RE .PP .PP Referenced by hocr::Hocr::do_layout_analysis(). .SS "int hocr_font_recognition (const \fBho_layout\fP * l_page, \fBho_string\fP * s_text_out, const unsigned char html, int font_code, const unsigned char nikud, unsigned char do_linguistics, int * progress)" .PP fill a text buffer with fonts recognized from a page layout .PP \fBParameters:\fP .RS 4 \fIl_page\fP the page layout to recognize .br \fIs_text_out\fP the text buffer to fill .br \fIhtml\fP output format is html .br \fIfont_code\fP code for the font to use .br \fInikud\fP recognize nikud in image .br \fIprogress\fP a progress indicator 0..100 .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .PP Referenced by hocr::Hocr::do_font_recognition(). .SS "int hocr_do_ocr_fine (const \fBho_pixbuf\fP * pix_in, \fBho_string\fP * s_text_out, const unsigned char scale, const unsigned char no_auto_scale, double rotate, const unsigned char no_auto_rotate, const unsigned char adaptive, const unsigned char threshold, const unsigned char a_threshold, const int font_spacing_code, const int paragraph_setup, const int slicing_threshold, const int slicing_width, const int line_leeway, const unsigned char dir_ltr, const unsigned char html, int font_code, const unsigned char nikud, const unsigned char do_linguistics, int * progress)" .PP do ocr on a pixbuf .PP \fBParameters:\fP .RS 4 \fIpix_in\fP the input \fBho_pixbuf\fP .br \fIs_text_out\fP the text buffer to fill .br \fIscale\fP the scale to use .br \fIno_auto_scale\fP do not try to autoscale .br \fIrotate\fP the rotation angle to use .br \fIno_auto_rotate\fP do not try to autorotate .br \fIadaptive\fP what type of thresholding to use. 0-normal,1-no,2-fine. .br \fIthreshold\fP the threshold to use 0..100 (0-auto) .br \fIa_threshold\fP the threshold to use for adaptive thresholding 0..100 (0-auto) .br \fIm_in\fP a pointer to a text bitmap .br \fIfont_spacing_code\fP -3 tight .. 0 .. 3 spaced .br \fIparagraph_setup\fP free text blocks or boxed in columns .br \fIslicing_threshold\fP percent of line fill to cut fonts .br \fIslicing_width\fP what is a wide font .br \fIdir\fP true-ltr false-rtl .br \fIhtml\fP output format is html .br \fIfont_code\fP code for the font to use .br \fInikud\fP recognize nikud in image .br \fIprogress\fP a progress indicator 0..100 .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int hocr_do_ocr (const \fBho_pixbuf\fP * pix_in, \fBho_string\fP * s_text_out, const unsigned char html, int font_code, const unsigned char do_linguistics, int * progress)" .PP do ocr on a pixbuf, using default values .PP \fBParameters:\fP .RS 4 \fIpix_in\fP the input \fBho_pixbuf\fP .br \fIs_text_out\fP the text buffer to fill .br \fIhtml\fP output format is html .br \fIfont_code\fP code for the font to use .br \fIprogress\fP a progress indicator 0..100 .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "const char* hocr_get_build_string ()" .PP return the build string .PP \fBReturns:\fP .RS 4 build string .RE .PP .PP Referenced by hocr::Hocr::get_build_string(). .SS "const char* hocr_get_version_string ()" .PP return the version string .PP \fBReturns:\fP .RS 4 version string .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/Makefile.am0000644000175000017500000000116211017002615014611 00000000000000EXTRA_DIST = \ ho_gtk.h.3 ho_objmap.3 ho_segment.h.3 \ ho_bitmap.3 ho_layout.3 ho_objmap.h.3 ho_string.3 \ ho_bitmap.h.3 ho_layout.h.3 ho_pixbuf.3 ho_array.3 ho_string.h.3 \ ho_dimentions.h.3 ho_obj.3 ho_pixbuf.h.3 ho_array.h.3 hocr.h.3 \ ho_font.h.3 ho_objlist.3 ho_recognize.h.3 \ hocr.3 hocr_Hocr.3 hocrpp.h.3 man_MANS = \ ho_gtk.h.3 ho_objmap.3 ho_segment.h.3 \ ho_bitmap.3 ho_layout.3 ho_objmap.h.3 ho_array.3 ho_string.3 \ ho_bitmap.h.3 ho_layout.h.3 ho_pixbuf.3 ho_array.h.3 ho_string.h.3 \ ho_dimentions.h.3 ho_obj.3 ho_pixbuf.h.3 hocr.h.3 \ ho_font.h.3 ho_objlist.3 ho_recognize.h.3 \ hocr.3 hocr_Hocr.3 hocrpp.h.3 libhocr-0.10.17/docs/man/man3/ho_font.h.30000644000175000017500000003230011044261550014526 00000000000000.TH "src/ho_font.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_font.h \- libhocr C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_FONT_H\fP 1" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_main_sign\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_second_object\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_holes\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_hbars\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_vbars\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_diagonal\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_diagonal_left\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_thin_naive\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_thin\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_cross\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_ends\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_edges_top\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_edges_top_big\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_edges_bottom\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_edges_bottom_big\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_edges_left\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_edges_left_big\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_edges_right\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_edges_right_big\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_notch_top\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_notch_bottom\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_notch_left\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_notch_right\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_filter\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, int filter_index)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_font_holes_filter\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, int filter_index)" .br .ti -1c .RI "int \fBho_font_pnm_save\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_nikud, const \fBho_bitmap\fP *m_mask, const char *filename)" .br .ti -1c .RI "int \fBho_font_pnm_load\fP (\fBho_bitmap\fP **m_text, \fBho_bitmap\fP **m_nikud, \fBho_bitmap\fP **m_mask, const char *filename)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_FONT_H 1" .PP .SH "Function Documentation" .PP .SS "\fBho_bitmap\fP* ho_font_main_sign (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of the main signs in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_second_object (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of the second object sign in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_holes (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of holes in the bitmap .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_hbars (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of horizontal bars found in the bitmap .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_vbars (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of vertical bars found in the bitmap .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_diagonal (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of -45 deg. diagonals found in the bitmap .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_diagonal_left (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of +45 deg. diagonals found in the bitmap .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_thin_naive (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a thinned bitmap without fixing artefacts .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_thin (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a thinned bitmap and fix artefacts .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_cross (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of cross points in input image .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_ends (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of end points in input image .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_edges_top (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of top side picks in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_edges_top_big (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of big top side picks in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_edges_bottom (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of bottom side picks in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_edges_bottom_big (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of big bottom side picks in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_edges_left (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of left side picks in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_edges_left_big (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of big left side picks in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_edges_right (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of right side picks in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_edges_right_big (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of big right side picks in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_notch_top (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of top side notches in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_notch_bottom (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of bottom side notches in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_notch_left (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of left side notches in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_notch_right (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask)" .PP return a bitmap of right side notches in the font .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_filter (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, int filter_index)" .PP return a bitmap of a filter .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .br \fIfilter_index\fP the index of the filter to use .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_font_holes_filter (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, int filter_index)" .PP return a bitmap of a filter used on font holes .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to the text bitmap .br \fIm_mask\fP pointer to the line map .br \fIfilter_index\fP the index of the filter to use .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "int ho_font_pnm_save (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_nikud, const \fBho_bitmap\fP * m_mask, const char * filename)" .PP writes font to file .PP \fBParameters:\fP .RS 4 \fIm_text\fP \fBho_bitmap\fP of main font .br \fIm_nikud\fP \fBho_bitmap\fP of nikud .br \fIm_mask\fP \fBho_bitmap\fP of line .br \fIfilename\fP save as file name .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_font_pnm_load (\fBho_bitmap\fP ** m_text, \fBho_bitmap\fP ** m_nikud, \fBho_bitmap\fP ** m_mask, const char * filename)" .PP read \fBho_pixbuf\fP from file .PP \fBParameters:\fP .RS 4 \fIm_text\fP pointer to return \fBho_bitmap\fP of main font .br \fIm_nikud\fP pointer to return \fBho_bitmap\fP of nikud .br \fIm_mask\fP pointer to return \fBho_bitmap\fP of line .br \fIfilename\fP file name .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_pixbuf\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_recognize.h.30000644000175000017500000005171211044261550015555 00000000000000.TH "src/ho_recognize.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_recognize.h \- libhocr C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_RECOGNIZE_H\fP 1" .br .ti -1c .RI "#define \fBHO_ARRAY_IN_SIZE\fP 104" .br .ti -1c .RI "#define \fBHO_ARRAY_OUT_SIZE\fP 51" .br .ti -1c .RI "#define \fBHEIGHT\fP (array_in[0])" .br .ti -1c .RI "#define \fBWIDTH\fP (array_in[1])" .br .ti -1c .RI "#define \fBWIDTH_BY_HEIGHT\fP (array_in[2])" .br .ti -1c .RI "#define \fBTOP\fP (array_in[3])" .br .ti -1c .RI "#define \fBBOTTOM\fP (array_in[4])" .br .ti -1c .RI "#define \fBTOP_LEFT\fP (array_in[5])" .br .ti -1c .RI "#define \fBTOP_MID\fP (array_in[6])" .br .ti -1c .RI "#define \fBTOP_RIGHT\fP (array_in[7])" .br .ti -1c .RI "#define \fBMID_LEFT\fP (array_in[8])" .br .ti -1c .RI "#define \fBMID_RIGHT\fP (array_in[9])" .br .ti -1c .RI "#define \fBBOTTOM_LEFT\fP (array_in[10])" .br .ti -1c .RI "#define \fBBOTTOM_MID\fP (array_in[11])" .br .ti -1c .RI "#define \fBBOTTOM_RIGHT\fP (array_in[12])" .br .ti -1c .RI "#define \fBTWO_VLINES_UP\fP (array_in[13])" .br .ti -1c .RI "#define \fBTWO_VLINES_DOWN\fP (array_in[14])" .br .ti -1c .RI "#define \fBTHREE_VLINES_UP\fP (array_in[15])" .br .ti -1c .RI "#define \fBTHREE_VLINES_DOWN\fP (array_in[16])" .br .ti -1c .RI "#define \fBTOP_HBAR\fP (array_in[17])" .br .ti -1c .RI "#define \fBMID_HBAR\fP (array_in[18])" .br .ti -1c .RI "#define \fBBOTTOM_HBAR\fP (array_in[19])" .br .ti -1c .RI "#define \fBLEFT_VBAR\fP (array_in[20])" .br .ti -1c .RI "#define \fBMID_VBAR\fP (array_in[21])" .br .ti -1c .RI "#define \fBRIGHT_VBAR\fP (array_in[22])" .br .ti -1c .RI "#define \fBDIAGONAL_BAR\fP (array_in[23])" .br .ti -1c .RI "#define \fBDIAGONAL_LEFT_BAR\fP (array_in[24])" .br .ti -1c .RI "#define \fBTOP_LEFT_EDGE\fP (array_in[25])" .br .ti -1c .RI "#define \fBMID_LEFT_EDGE\fP (array_in[26])" .br .ti -1c .RI "#define \fBBOTTOM_LEFT_EDGE\fP (array_in[27])" .br .ti -1c .RI "#define \fBTOP_RIGTH_EDGE\fP (array_in[28])" .br .ti -1c .RI "#define \fBMID_RIGTH_EDGE\fP (array_in[29])" .br .ti -1c .RI "#define \fBBOTTOM_RIGTH_EDGE\fP (array_in[30])" .br .ti -1c .RI "#define \fBLEFT_TOP_EDGE\fP (array_in[31])" .br .ti -1c .RI "#define \fBMID_TOP_EDGE\fP (array_in[32])" .br .ti -1c .RI "#define \fBRIGHT_TOP_EDGE\fP (array_in[33])" .br .ti -1c .RI "#define \fBLEFT_BOTTOM_EDGE\fP (array_in[34])" .br .ti -1c .RI "#define \fBMID_BOTTOM_EDGE\fP (array_in[35])" .br .ti -1c .RI "#define \fBRIGHT_BOTTOM_EDGE\fP (array_in[36])" .br .ti -1c .RI "#define \fBTOP_LEFT_NOTCH\fP (array_in[37])" .br .ti -1c .RI "#define \fBMID_LEFT_NOTCH\fP (array_in[38])" .br .ti -1c .RI "#define \fBBOTTOM_LEFT_NOTCH\fP (array_in[39])" .br .ti -1c .RI "#define \fBTOP_RIGHT_NOTCH\fP (array_in[40])" .br .ti -1c .RI "#define \fBMID_RIGHT_NOTCH\fP (array_in[41])" .br .ti -1c .RI "#define \fBBOTTOM_RIGHT_NOTCH\fP (array_in[42])" .br .ti -1c .RI "#define \fBLEFT_TOP_NOTCH\fP (array_in[43])" .br .ti -1c .RI "#define \fBMID_TOP_NOTCH\fP (array_in[44])" .br .ti -1c .RI "#define \fBRIGHT_TOP_NOTCH\fP (array_in[45])" .br .ti -1c .RI "#define \fBLEFT_BOTTOM_NOTCH\fP (array_in[46])" .br .ti -1c .RI "#define \fBMID_BOTTOM_NOTCH\fP (array_in[47])" .br .ti -1c .RI "#define \fBRIGHT_BOTTOM_NOTCH\fP (array_in[48])" .br .ti -1c .RI "#define \fBTOP_LEFT_END\fP (array_in[49])" .br .ti -1c .RI "#define \fBTOP_MID_END\fP (array_in[50])" .br .ti -1c .RI "#define \fBTOP_RIGHT_END\fP (array_in[51])" .br .ti -1c .RI "#define \fBMID_LEFT_END\fP (array_in[52])" .br .ti -1c .RI "#define \fBMID_MID_END\fP (array_in[53])" .br .ti -1c .RI "#define \fBMID_RIGHT_END\fP (array_in[54])" .br .ti -1c .RI "#define \fBBOTTOM_LEFT_END\fP (array_in[55])" .br .ti -1c .RI "#define \fBBOTTOM_MID_END\fP (array_in[56])" .br .ti -1c .RI "#define \fBBOTTOM_RIGHT_END\fP (array_in[57])" .br .ti -1c .RI "#define \fBTOP_LEFT_CROSS\fP (array_in[58])" .br .ti -1c .RI "#define \fBTOP_MID_CROSS\fP (array_in[59])" .br .ti -1c .RI "#define \fBTOP_RIGHT_CROSS\fP (array_in[60])" .br .ti -1c .RI "#define \fBMID_LEFT_CROSS\fP (array_in[61])" .br .ti -1c .RI "#define \fBMID_MID_CROSS\fP (array_in[62])" .br .ti -1c .RI "#define \fBMID_RIGHT_CROSS\fP (array_in[63])" .br .ti -1c .RI "#define \fBBOTTOM_LEFT_CROSS\fP (array_in[64])" .br .ti -1c .RI "#define \fBBOTTOM_MID_CROSS\fP (array_in[65])" .br .ti -1c .RI "#define \fBBOTTOM_RIGHT_CROSS\fP (array_in[66])" .br .ti -1c .RI "#define \fBONE_HOLE\fP (array_in[67])" .br .ti -1c .RI "#define \fBTWO_HOLES\fP (array_in[68])" .br .ti -1c .RI "#define \fBHEY_PART\fP (array_in[69])" .br .ti -1c .RI "#define \fBDOT_PART\fP (array_in[70])" .br .ti -1c .RI "#define \fBCOMMA_PART\fP (array_in[71])" .br .ti -1c .RI "#define \fBHOLE_TOP_LEFT_EDGE\fP (array_in[72])" .br .ti -1c .RI "#define \fBHOLE_MID_LEFT_EDGE\fP (array_in[73])" .br .ti -1c .RI "#define \fBHOLE_BOTTOM_LEFT_EDGE\fP (array_in[74])" .br .ti -1c .RI "#define \fBHOLE_TOP_RIGTH_EDGE\fP (array_in[75])" .br .ti -1c .RI "#define \fBHOLE_MID_RIGTH_EDGE\fP (array_in[76])" .br .ti -1c .RI "#define \fBHOLE_BOTTOM_RIGTH_EDGE\fP (array_in[77])" .br .ti -1c .RI "#define \fBHOLE_LEFT_TOP_EDGE\fP (array_in[78])" .br .ti -1c .RI "#define \fBHOLE_MID_TOP_EDGE\fP (array_in[79])" .br .ti -1c .RI "#define \fBHOLE_RIGHT_TOP_EDGE\fP (array_in[80])" .br .ti -1c .RI "#define \fBHOLE_LEFT_BOTTOM_EDGE\fP (array_in[81])" .br .ti -1c .RI "#define \fBHOLE_MID_BOTTOM_EDGE\fP (array_in[82])" .br .ti -1c .RI "#define \fBHOLE_RIGHT_BOTTOM_EDGE\fP (array_in[83])" .br .ti -1c .RI "#define \fBHOLE_HEIGHT\fP (array_in[84])" .br .ti -1c .RI "#define \fBHOLE_WIDTH\fP (array_in[85])" .br .ti -1c .RI "#define \fBHOLE_TOP\fP (array_in[86])" .br .ti -1c .RI "#define \fBHOLE_BOTTOM\fP (array_in[87])" .br .ti -1c .RI "#define \fBHOLE_TOP_LEFT\fP (array_in[88])" .br .ti -1c .RI "#define \fBHOLE_TOP_RIGHT\fP (array_in[89])" .br .ti -1c .RI "#define \fBHOLE_BOTTOM_LEFT\fP (array_in[90])" .br .ti -1c .RI "#define \fBHOLE_BOTTOM_RIGHT\fP (array_in[91])" .br .ti -1c .RI "#define \fBBIG_TOP_LEFT_EDGE\fP (array_in[92])" .br .ti -1c .RI "#define \fBBIG_MID_LEFT_EDGE\fP (array_in[93])" .br .ti -1c .RI "#define \fBBIG_BOTTOM_LEFT_EDGE\fP (array_in[94])" .br .ti -1c .RI "#define \fBBIG_TOP_RIGTH_EDGE\fP (array_in[95])" .br .ti -1c .RI "#define \fBBIG_MID_RIGTH_EDGE\fP (array_in[96])" .br .ti -1c .RI "#define \fBBIG_BOTTOM_RIGTH_EDGE\fP (array_in[97])" .br .ti -1c .RI "#define \fBBIG_LEFT_TOP_EDGE\fP (array_in[98])" .br .ti -1c .RI "#define \fBBIG_MID_TOP_EDGE\fP (array_in[99])" .br .ti -1c .RI "#define \fBBIG_RIGHT_TOP_EDGE\fP (array_in[100])" .br .ti -1c .RI "#define \fBBIG_LEFT_BOTTOM_EDGE\fP (array_in[101])" .br .ti -1c .RI "#define \fBBIG_MID_BOTTOM_EDGE\fP (array_in[102])" .br .ti -1c .RI "#define \fBBIG_RIGHT_BOTTOM_EDGE\fP (array_in[103])" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "int \fBho_recognize_array_in_size\fP ()" .br .ti -1c .RI "int \fBho_recognize_array_out_size\fP ()" .br .ti -1c .RI "int \fBho_recognize_create_array_in\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *array_in)" .br .ti -1c .RI "int \fBho_recognize_create_array_out\fP (const double *array_in, double *array_out, int font_code)" .br .ti -1c .RI "const char * \fBho_recognize_array_out_to_font\fP (const double *array_out, int *this_char_i)" .br .ti -1c .RI "const char * \fBho_recognize_font\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, int font_code, unsigned char do_linguistics, unsigned char word_end, unsigned char word_start, int *this_char_i, int last_char_i)" .br .ti -1c .RI "int \fBho_recognize_dimentions\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *height, double *width, double *top, double *bottom, double *top_left, double *top_mid, double *top_right, double *mid_left, double *mid_right, double *bottom_left, double *bottom_mid, double *bottom_right, double *has_two_hlines_up, double *has_two_hlines_down, double *has_three_hlines_up, double *has_three_hlines_down)" .br .ti -1c .RI "int \fBho_recognize_bars\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *has_top_bar, double *has_mid_hbar, double *has_bottom_bar, double *has_left_bar, double *has_mid_vbar, double *has_right_bar, double *has_diagonal_bar, double *has_diagonal_left_bar)" .br .ti -1c .RI "int \fBho_recognize_edges\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *has_top_left_edge, double *has_mid_left_edge, double *has_bottom_left_edge, double *has_top_right_edge, double *has_mid_right_edge, double *has_bottom_right_edge, double *has_left_top_edge, double *has_mid_top_edge, double *has_right_top_edge, double *has_left_bottom_edge, double *has_mid_bottom_edge, double *has_right_bottom_edge)" .br .ti -1c .RI "int \fBho_recognize_edges_big\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *has_top_left_edge, double *has_mid_left_edge, double *has_bottom_left_edge, double *has_top_right_edge, double *has_mid_right_edge, double *has_bottom_right_edge, double *has_left_top_edge, double *has_mid_top_edge, double *has_right_top_edge, double *has_left_bottom_edge, double *has_mid_bottom_edge, double *has_right_bottom_edge)" .br .ti -1c .RI "int \fBho_recognize_notches\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *has_top_left_notch, double *has_mid_left_notch, double *has_bottom_left_notch, double *has_top_right_notch, double *has_mid_right_notch, double *has_bottom_right_notch, double *has_left_top_notch, double *has_mid_top_notch, double *has_right_top_notch, double *has_left_bottom_notch, double *has_mid_bottom_notch, double *has_right_bottom_notch)" .br .ti -1c .RI "int \fBho_recognize_parts\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *has_one_hole, double *has_two_holes, double *has_hey_part, double *has_dot_part, double *has_comma_part)" .br .ti -1c .RI "int \fBho_recognize_ends\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *has_top_left_end, double *has_top_mid_end, double *has_top_right_end, double *has_mid_left_end, double *has_mid_mid_end, double *has_mid_right_end, double *has_bottom_left_end, double *has_bottom_mid_end, double *has_bottom_right_end, double *has_top_left_cross, double *has_top_mid_cross, double *has_top_right_cross, double *has_mid_left_cross, double *has_mid_mid_cross, double *has_mid_right_cross, double *has_bottom_left_cross, double *has_bottom_mid_cross, double *has_bottom_right_cross)" .br .ti -1c .RI "int \fBho_recognize_holes_dimentions\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *height, double *width, double *top, double *bottom, double *top_left, double *top_right, double *bottom_left, double *bottom_right)" .br .ti -1c .RI "int \fBho_recognize_holes_edges\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_mask, double *has_top_left_edge, double *has_mid_left_edge, double *has_bottom_left_edge, double *has_top_right_edge, double *has_mid_right_edge, double *has_bottom_right_edge, double *has_left_top_edge, double *has_mid_top_edge, double *has_right_top_edge, double *has_left_bottom_edge, double *has_mid_bottom_edge, double *has_right_bottom_edge)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_RECOGNIZE_H 1" .PP .SS "#define HO_ARRAY_IN_SIZE 104" .PP .SS "#define HO_ARRAY_OUT_SIZE 51" .PP .SS "#define HEIGHT (array_in[0])" .PP .SS "#define WIDTH (array_in[1])" .PP .SS "#define WIDTH_BY_HEIGHT (array_in[2])" .PP .SS "#define TOP (array_in[3])" .PP .SS "#define BOTTOM (array_in[4])" .PP .SS "#define TOP_LEFT (array_in[5])" .PP .SS "#define TOP_MID (array_in[6])" .PP .SS "#define TOP_RIGHT (array_in[7])" .PP .SS "#define MID_LEFT (array_in[8])" .PP .SS "#define MID_RIGHT (array_in[9])" .PP .SS "#define BOTTOM_LEFT (array_in[10])" .PP .SS "#define BOTTOM_MID (array_in[11])" .PP .SS "#define BOTTOM_RIGHT (array_in[12])" .PP .SS "#define TWO_VLINES_UP (array_in[13])" .PP .SS "#define TWO_VLINES_DOWN (array_in[14])" .PP .SS "#define THREE_VLINES_UP (array_in[15])" .PP .SS "#define THREE_VLINES_DOWN (array_in[16])" .PP .SS "#define TOP_HBAR (array_in[17])" .PP .SS "#define MID_HBAR (array_in[18])" .PP .SS "#define BOTTOM_HBAR (array_in[19])" .PP .SS "#define LEFT_VBAR (array_in[20])" .PP .SS "#define MID_VBAR (array_in[21])" .PP .SS "#define RIGHT_VBAR (array_in[22])" .PP .SS "#define DIAGONAL_BAR (array_in[23])" .PP .SS "#define DIAGONAL_LEFT_BAR (array_in[24])" .PP .SS "#define TOP_LEFT_EDGE (array_in[25])" .PP .SS "#define MID_LEFT_EDGE (array_in[26])" .PP .SS "#define BOTTOM_LEFT_EDGE (array_in[27])" .PP .SS "#define TOP_RIGTH_EDGE (array_in[28])" .PP .SS "#define MID_RIGTH_EDGE (array_in[29])" .PP .SS "#define BOTTOM_RIGTH_EDGE (array_in[30])" .PP .SS "#define LEFT_TOP_EDGE (array_in[31])" .PP .SS "#define MID_TOP_EDGE (array_in[32])" .PP .SS "#define RIGHT_TOP_EDGE (array_in[33])" .PP .SS "#define LEFT_BOTTOM_EDGE (array_in[34])" .PP .SS "#define MID_BOTTOM_EDGE (array_in[35])" .PP .SS "#define RIGHT_BOTTOM_EDGE (array_in[36])" .PP .SS "#define TOP_LEFT_NOTCH (array_in[37])" .PP .SS "#define MID_LEFT_NOTCH (array_in[38])" .PP .SS "#define BOTTOM_LEFT_NOTCH (array_in[39])" .PP .SS "#define TOP_RIGHT_NOTCH (array_in[40])" .PP .SS "#define MID_RIGHT_NOTCH (array_in[41])" .PP .SS "#define BOTTOM_RIGHT_NOTCH (array_in[42])" .PP .SS "#define LEFT_TOP_NOTCH (array_in[43])" .PP .SS "#define MID_TOP_NOTCH (array_in[44])" .PP .SS "#define RIGHT_TOP_NOTCH (array_in[45])" .PP .SS "#define LEFT_BOTTOM_NOTCH (array_in[46])" .PP .SS "#define MID_BOTTOM_NOTCH (array_in[47])" .PP .SS "#define RIGHT_BOTTOM_NOTCH (array_in[48])" .PP .SS "#define TOP_LEFT_END (array_in[49])" .PP .SS "#define TOP_MID_END (array_in[50])" .PP .SS "#define TOP_RIGHT_END (array_in[51])" .PP .SS "#define MID_LEFT_END (array_in[52])" .PP .SS "#define MID_MID_END (array_in[53])" .PP .SS "#define MID_RIGHT_END (array_in[54])" .PP .SS "#define BOTTOM_LEFT_END (array_in[55])" .PP .SS "#define BOTTOM_MID_END (array_in[56])" .PP .SS "#define BOTTOM_RIGHT_END (array_in[57])" .PP .SS "#define TOP_LEFT_CROSS (array_in[58])" .PP .SS "#define TOP_MID_CROSS (array_in[59])" .PP .SS "#define TOP_RIGHT_CROSS (array_in[60])" .PP .SS "#define MID_LEFT_CROSS (array_in[61])" .PP .SS "#define MID_MID_CROSS (array_in[62])" .PP .SS "#define MID_RIGHT_CROSS (array_in[63])" .PP .SS "#define BOTTOM_LEFT_CROSS (array_in[64])" .PP .SS "#define BOTTOM_MID_CROSS (array_in[65])" .PP .SS "#define BOTTOM_RIGHT_CROSS (array_in[66])" .PP .SS "#define ONE_HOLE (array_in[67])" .PP .SS "#define TWO_HOLES (array_in[68])" .PP .SS "#define HEY_PART (array_in[69])" .PP .SS "#define DOT_PART (array_in[70])" .PP .SS "#define COMMA_PART (array_in[71])" .PP .SS "#define HOLE_TOP_LEFT_EDGE (array_in[72])" .PP .SS "#define HOLE_MID_LEFT_EDGE (array_in[73])" .PP .SS "#define HOLE_BOTTOM_LEFT_EDGE (array_in[74])" .PP .SS "#define HOLE_TOP_RIGTH_EDGE (array_in[75])" .PP .SS "#define HOLE_MID_RIGTH_EDGE (array_in[76])" .PP .SS "#define HOLE_BOTTOM_RIGTH_EDGE (array_in[77])" .PP .SS "#define HOLE_LEFT_TOP_EDGE (array_in[78])" .PP .SS "#define HOLE_MID_TOP_EDGE (array_in[79])" .PP .SS "#define HOLE_RIGHT_TOP_EDGE (array_in[80])" .PP .SS "#define HOLE_LEFT_BOTTOM_EDGE (array_in[81])" .PP .SS "#define HOLE_MID_BOTTOM_EDGE (array_in[82])" .PP .SS "#define HOLE_RIGHT_BOTTOM_EDGE (array_in[83])" .PP .SS "#define HOLE_HEIGHT (array_in[84])" .PP .SS "#define HOLE_WIDTH (array_in[85])" .PP .SS "#define HOLE_TOP (array_in[86])" .PP .SS "#define HOLE_BOTTOM (array_in[87])" .PP .SS "#define HOLE_TOP_LEFT (array_in[88])" .PP .SS "#define HOLE_TOP_RIGHT (array_in[89])" .PP .SS "#define HOLE_BOTTOM_LEFT (array_in[90])" .PP .SS "#define HOLE_BOTTOM_RIGHT (array_in[91])" .PP .SS "#define BIG_TOP_LEFT_EDGE (array_in[92])" .PP .SS "#define BIG_MID_LEFT_EDGE (array_in[93])" .PP .SS "#define BIG_BOTTOM_LEFT_EDGE (array_in[94])" .PP .SS "#define BIG_TOP_RIGTH_EDGE (array_in[95])" .PP .SS "#define BIG_MID_RIGTH_EDGE (array_in[96])" .PP .SS "#define BIG_BOTTOM_RIGTH_EDGE (array_in[97])" .PP .SS "#define BIG_LEFT_TOP_EDGE (array_in[98])" .PP .SS "#define BIG_MID_TOP_EDGE (array_in[99])" .PP .SS "#define BIG_RIGHT_TOP_EDGE (array_in[100])" .PP .SS "#define BIG_LEFT_BOTTOM_EDGE (array_in[101])" .PP .SS "#define BIG_MID_BOTTOM_EDGE (array_in[102])" .PP .SS "#define BIG_RIGHT_BOTTOM_EDGE (array_in[103])" .PP .SH "Function Documentation" .PP .SS "int ho_recognize_array_in_size ()" .PP .SS "int ho_recognize_array_out_size ()" .PP .SS "int ho_recognize_create_array_in (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * array_in)" .PP .SS "int ho_recognize_create_array_out (const double * array_in, double * array_out, int font_code)" .PP .SS "const char* ho_recognize_array_out_to_font (const double * array_out, int * this_char_i)" .PP .SS "const char* ho_recognize_font (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, int font_code, unsigned char do_linguistics, unsigned char word_end, unsigned char word_start, int * this_char_i, int last_char_i)" .PP .SS "int ho_recognize_dimentions (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * height, double * width, double * top, double * bottom, double * top_left, double * top_mid, double * top_right, double * mid_left, double * mid_right, double * bottom_left, double * bottom_mid, double * bottom_right, double * has_two_hlines_up, double * has_two_hlines_down, double * has_three_hlines_up, double * has_three_hlines_down)" .PP .SS "int ho_recognize_bars (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * has_top_bar, double * has_mid_hbar, double * has_bottom_bar, double * has_left_bar, double * has_mid_vbar, double * has_right_bar, double * has_diagonal_bar, double * has_diagonal_left_bar)" .PP .SS "int ho_recognize_edges (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * has_top_left_edge, double * has_mid_left_edge, double * has_bottom_left_edge, double * has_top_right_edge, double * has_mid_right_edge, double * has_bottom_right_edge, double * has_left_top_edge, double * has_mid_top_edge, double * has_right_top_edge, double * has_left_bottom_edge, double * has_mid_bottom_edge, double * has_right_bottom_edge)" .PP .SS "int ho_recognize_edges_big (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * has_top_left_edge, double * has_mid_left_edge, double * has_bottom_left_edge, double * has_top_right_edge, double * has_mid_right_edge, double * has_bottom_right_edge, double * has_left_top_edge, double * has_mid_top_edge, double * has_right_top_edge, double * has_left_bottom_edge, double * has_mid_bottom_edge, double * has_right_bottom_edge)" .PP .SS "int ho_recognize_notches (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * has_top_left_notch, double * has_mid_left_notch, double * has_bottom_left_notch, double * has_top_right_notch, double * has_mid_right_notch, double * has_bottom_right_notch, double * has_left_top_notch, double * has_mid_top_notch, double * has_right_top_notch, double * has_left_bottom_notch, double * has_mid_bottom_notch, double * has_right_bottom_notch)" .PP .SS "int ho_recognize_parts (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * has_one_hole, double * has_two_holes, double * has_hey_part, double * has_dot_part, double * has_comma_part)" .PP .SS "int ho_recognize_ends (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * has_top_left_end, double * has_top_mid_end, double * has_top_right_end, double * has_mid_left_end, double * has_mid_mid_end, double * has_mid_right_end, double * has_bottom_left_end, double * has_bottom_mid_end, double * has_bottom_right_end, double * has_top_left_cross, double * has_top_mid_cross, double * has_top_right_cross, double * has_mid_left_cross, double * has_mid_mid_cross, double * has_mid_right_cross, double * has_bottom_left_cross, double * has_bottom_mid_cross, double * has_bottom_right_cross)" .PP .SS "int ho_recognize_holes_dimentions (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * height, double * width, double * top, double * bottom, double * top_left, double * top_right, double * bottom_left, double * bottom_right)" .PP .SS "int ho_recognize_holes_edges (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_mask, double * has_top_left_edge, double * has_mid_left_edge, double * has_bottom_left_edge, double * has_top_right_edge, double * has_mid_right_edge, double * has_bottom_right_edge, double * has_left_top_edge, double * has_mid_top_edge, double * has_right_top_edge, double * has_left_bottom_edge, double * has_mid_bottom_edge, double * has_right_bottom_edge)" .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_objmap.h.30000644000175000017500000002350411044261550015036 00000000000000.TH "src/ho_objmap.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_objmap.h \- libhocr C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBho_obj\fP" .br .RI "\fIlibhocr object struct \fP" .ti -1c .RI "struct \fBho_objlist\fP" .br .RI "\fIlibhocr object list struct \fP" .ti -1c .RI "struct \fBho_objmap\fP" .br .RI "\fIlibhocr object map struct \fP" .in -1c .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_OBJMAP_H\fP 1" .br .ti -1c .RI "#define \fBho_objmap_set\fP(m, x, y, val) (((m)->map)[(x) + (y) * (m)->width] = (val))" .br .ti -1c .RI "#define \fBho_objmap_get\fP(m, x, y) (((m)->map)[(x) + (y) * (m)->width])" .br .ti -1c .RI "#define \fBho_objmap_get_size\fP(m) ((m)->obj_list->size)" .br .ti -1c .RI "#define \fBho_objmap_get_object\fP(m, i) ((m)->obj_list->objects[(i)])" .br .ti -1c .RI "#define \fBho_objmap_get_width\fP(m) ((m)->width)" .br .ti -1c .RI "#define \fBho_objmap_get_height\fP(m) ((m)->height)" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_objlist\fP * \fBho_objlist_new\fP ()" .br .ti -1c .RI "int \fBho_objlist_free\fP (\fBho_objlist\fP *object_list)" .br .ti -1c .RI "int \fBho_objlist_add\fP (\fBho_objlist\fP *object_list, double weight, int x, int y, int width, int height)" .br .ti -1c .RI "int \fBho_objlist_get_index\fP (\fBho_objlist\fP *object_list, int index)" .br .ti -1c .RI "\fBho_obj\fP * \fBho_objlist_get_object\fP (\fBho_objlist\fP *object_list, int index)" .br .ti -1c .RI "int \fBho_objlist_add_pixel\fP (\fBho_objlist\fP *object_list, int index, int x, int y)" .br .ti -1c .RI "int \fBho_objlist_link\fP (\fBho_objlist\fP *object_list, int index1, int index2)" .br .ti -1c .RI "int \fBho_objlist_clean\fP (\fBho_objlist\fP *object_list, int **map)" .br .ti -1c .RI "int \fBho_objlist_clean_by_reading_index\fP (\fBho_objlist\fP *object_list, int **map)" .br .ti -1c .RI "int \fBho_objlist_print\fP (\fBho_objlist\fP *object_list)" .br .ti -1c .RI "int \fBho_objlist_statistics\fP (\fBho_objlist\fP *object_list, int min_height, int max_height, int min_width, int max_width, int *counter, double *weight_avg, double *weight_com, double *weight_min, double *weight_max, int *height_avg, int *height_com, int *height_min, int *height_max, int *width_avg, int *width_com, int *width_min, int *width_max)" .br .ti -1c .RI "\fBho_objmap\fP * \fBho_objmap_new\fP (const int width, const int height)" .br .ti -1c .RI "int \fBho_objmap_free\fP (\fBho_objmap\fP *m)" .br .ti -1c .RI "int \fBho_objmap_clean\fP (\fBho_objmap\fP *m)" .br .ti -1c .RI "int \fBho_objmap_sort_by_reading_index\fP (\fBho_objmap\fP *m, const unsigned char col, const unsigned char dir_ltr)" .br .ti -1c .RI "\fBho_objmap\fP * \fBho_objmap_new_from_bitmap\fP (const \fBho_bitmap\fP *bit_in)" .br .ti -1c .RI "int \fBho_objmap_font_metrix\fP (const \fBho_objmap\fP *m, const int min_height, const int max_height, const int min_width, const int max_width, int *height, int *width, unsigned char *nikud)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_objmap_to_bitmap\fP (const \fBho_objmap\fP *obj_in)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_objmap_to_bitmap_by_size\fP (const \fBho_objmap\fP *m, int min_height, int max_height, int min_width, int max_width)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_objmap_to_bitmap_by_index\fP (const \fBho_objmap\fP *m, const int index)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_objmap_to_bitmap_by_index_window\fP (const \fBho_objmap\fP *m, const int index, const int frame)" .br .ti -1c .RI "int \fBho_objmap_update_reading_index\fP (\fBho_objmap\fP *m, const unsigned char n_columns, const unsigned char dir_ltr)" .br .ti -1c .RI "\fBho_obj\fP * \fBho_objmap_get_object_by_index\fP (\fBho_objmap\fP *m, int index)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_OBJMAP_H 1" .PP .SS "#define ho_objmap_set(m, x, y, val) (((m)->map)[(x) + (y) * (m)->width] = (val))" .PP .SS "#define ho_objmap_get(m, x, y) (((m)->map)[(x) + (y) * (m)->width])" .PP .SS "#define ho_objmap_get_size(m) ((m)->obj_list->size)" .PP .SS "#define ho_objmap_get_object(m, i) ((m)->obj_list->objects[(i)])" .PP .SS "#define ho_objmap_get_width(m) ((m)->width)" .PP .SS "#define ho_objmap_get_height(m) ((m)->height)" .PP .SH "Function Documentation" .PP .SS "\fBho_objlist\fP* ho_objlist_new ()" .PP .SS "int ho_objlist_free (\fBho_objlist\fP * object_list)" .PP .SS "int ho_objlist_add (\fBho_objlist\fP * object_list, double weight, int x, int y, int width, int height)" .PP .SS "int ho_objlist_get_index (\fBho_objlist\fP * object_list, int index)" .PP .SS "\fBho_obj\fP* ho_objlist_get_object (\fBho_objlist\fP * object_list, int index)" .PP .SS "int ho_objlist_add_pixel (\fBho_objlist\fP * object_list, int index, int x, int y)" .PP .SS "int ho_objlist_link (\fBho_objlist\fP * object_list, int index1, int index2)" .PP .SS "int ho_objlist_clean (\fBho_objlist\fP * object_list, int ** map)" .PP .SS "int ho_objlist_clean_by_reading_index (\fBho_objlist\fP * object_list, int ** map)" .PP .SS "int ho_objlist_print (\fBho_objlist\fP * object_list)" .PP .SS "int ho_objlist_statistics (\fBho_objlist\fP * object_list, int min_height, int max_height, int min_width, int max_width, int * counter, double * weight_avg, double * weight_com, double * weight_min, double * weight_max, int * height_avg, int * height_com, int * height_min, int * height_max, int * width_avg, int * width_com, int * width_min, int * width_max)" .PP .SS "\fBho_objmap\fP* ho_objmap_new (const int width, const int height)" .PP new \fBho_pixbuf\fP .PP \fBParameters:\fP .RS 4 \fIheight\fP hight of pixbuf in pixels .br \fIwidth\fP width of pixbuf in pixels .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_pixbuf\fP .RE .PP .SS "int ho_objmap_free (\fBho_objmap\fP * m)" .PP free an \fBho_objmap\fP .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_objmap\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_objmap_clean (\fBho_objmap\fP * m)" .PP clean the \fBho_objmap\fP index list .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_objmap\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_objmap_sort_by_reading_index (\fBho_objmap\fP * m, const unsigned char col, const unsigned char dir_ltr)" .PP sort the \fBho_objmap\fP by reading index .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_objmap\fP .br \fIcol\fP numbere of columns .br \fIdir_ltr\fP true-ltr false-rtl .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_objmap\fP* ho_objmap_new_from_bitmap (const \fBho_bitmap\fP * bit_in)" .PP new \fBho_objmap\fP from \fBho_bitmap\fP .PP \fBParameters:\fP .RS 4 \fIbit_in\fP pointer to an \fBho_bitmap\fP image .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_objmap\fP .RE .PP .SS "int ho_objmap_font_metrix (const \fBho_objmap\fP * m, const int min_height, const int max_height, const int min_width, const int max_width, int * height, int * width, unsigned char * nikud)" .PP guess font metrics .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_objmap\fP .br \fImin_height\fP only objects with this minimal height are used .br \fImax_height\fP only objects with this maximal height are used .br \fImin_width\fP only objects with this minimal width are used .br \fImax_width\fP only objects with this maximal width are used .br \fIheight\fP pointer to return the guessed font average height .br \fIwidth\fP pointer to return the guessed font average width .br \fInikud\fP pointer to return the guessed nikud in page .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_bitmap\fP* ho_objmap_to_bitmap (const \fBho_objmap\fP * obj_in)" .PP new ho_bitamp from objmap .PP \fBParameters:\fP .RS 4 \fIobj_in\fP the object map to use .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_objmap_to_bitmap_by_size (const \fBho_objmap\fP * m, int min_height, int max_height, int min_width, int max_width)" .PP copy objects from objmap to bitmap by size .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_objmap\fP .br \fImin_height\fP only objects with this minimal height are copied .br \fImax_height\fP only objects with this maximal height are copied .br \fImin_width\fP only objects with this minimal width are copied .br \fImax_width\fP only objects with this maximal width are copied .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_objmap_to_bitmap_by_index (const \fBho_objmap\fP * m, const int index)" .PP copy objects from objmap to bitmap by index .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_objmap\fP .br \fIindex\fP the index of the object to copy .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap size of objmap .RE .PP .SS "\fBho_bitmap\fP* ho_objmap_to_bitmap_by_index_window (const \fBho_objmap\fP * m, const int index, const int frame)" .PP copy objects from objmap to bitmap by index of the object .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_objmap\fP .br \fIindex\fP the index of the object to copy .br \fIframe\fP size of white frame in the new bitmap .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap size of object + frame .RE .PP .SS "int ho_objmap_update_reading_index (\fBho_objmap\fP * m, const unsigned char n_columns, const unsigned char dir_ltr)" .PP guess reading_index .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_objmap\fP .br \fIn_columns\fP numbere of columns .br \fIdir_ltr\fP true-ltr false-rtl .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_obj\fP* ho_objmap_get_object_by_index (\fBho_objmap\fP * m, int index)" .PP get an object by index .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_objmap\fP .br \fIindex\fP the object index .RE .PP \fBReturns:\fP .RS 4 the object .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/Makefile.in0000644000175000017500000002673611043604650014646 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/man/man3 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man3dir = $(mandir)/man3 am__installdirs = "$(DESTDIR)$(man3dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ ho_gtk.h.3 ho_objmap.3 ho_segment.h.3 \ ho_bitmap.3 ho_layout.3 ho_objmap.h.3 ho_string.3 \ ho_bitmap.h.3 ho_layout.h.3 ho_pixbuf.3 ho_array.3 ho_string.h.3 \ ho_dimentions.h.3 ho_obj.3 ho_pixbuf.h.3 ho_array.h.3 hocr.h.3 \ ho_font.h.3 ho_objlist.3 ho_recognize.h.3 \ hocr.3 hocr_Hocr.3 hocrpp.h.3 man_MANS = \ ho_gtk.h.3 ho_objmap.3 ho_segment.h.3 \ ho_bitmap.3 ho_layout.3 ho_objmap.h.3 ho_array.3 ho_string.3 \ ho_bitmap.h.3 ho_layout.h.3 ho_pixbuf.3 ho_array.h.3 ho_string.h.3 \ ho_dimentions.h.3 ho_obj.3 ho_pixbuf.h.3 hocr.h.3 \ ho_font.h.3 ho_objlist.3 ho_recognize.h.3 \ hocr.3 hocr_Hocr.3 hocrpp.h.3 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/man/man3/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/man/man3/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man3: $(man3_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.3*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 3*) ;; \ *) ext='3' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \ done uninstall-man3: @$(NORMAL_UNINSTALL) @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.3*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 3*) ;; \ *) ext='3' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man3dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-man3 install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man3 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man3 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-man uninstall-man3 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/docs/man/man3/ho_array.h.30000644000175000017500000005325411044261550014711 00000000000000.TH "src/ho_array.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_array.h \- libhocr C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBho_array\fP" .br .RI "\fIlibhocr array struct \fP" .in -1c .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_ARRAY_H\fP 1" .br .ti -1c .RI "#define \fBho_array_set\fP(m, x, y, val) (((m)->data)[(x)+(y)*(m)->width]=(val))" .br .ti -1c .RI "#define \fBho_array_get\fP(m, x, y) (((m)->data)[(x)+(y)*(m)->width])" .br .ti -1c .RI "#define \fBho_array_get_width\fP(m) ((m)->width)" .br .ti -1c .RI "#define \fBho_array_get_height\fP(m) ((m)->height)" .br .ti -1c .RI "#define \fBho_array_get_data\fP(m) ((m)->data)" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_array\fP * \fBho_array_new\fP (const int width, const int height)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_clone\fP (const \fBho_array\fP *m)" .br .ti -1c .RI "int \fBho_array_set_data\fP (\fBho_array\fP *pix, double data)" .br .ti -1c .RI "int \fBho_array_set_at\fP (\fBho_array\fP *pix, int x, int y, double data)" .br .ti -1c .RI "double \fBho_array_get_at\fP (\fBho_array\fP *pix, int x, int y)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_new_from_pixbuf\fP (const \fBho_pixbuf\fP *pix)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_new_from_bitmap\fP (const \fBho_bitmap\fP *pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_array_to_pixbuf\fP (const \fBho_array\fP *pix_in)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_array_to_rgb_pixbuf\fP (const \fBho_array\fP *pix_in)" .br .ti -1c .RI "int \fBho_array_free\fP (\fBho_array\fP *pix)" .br .ti -1c .RI "unsigned char \fBho_array_minmax\fP (const \fBho_array\fP *pix, double *min, double *max)" .br .ti -1c .RI "double \fBho_array_get_mean\fP (const \fBho_array\fP *pix)" .br .ti -1c .RI "double \fBho_array_get_min\fP (const \fBho_array\fP *pix)" .br .ti -1c .RI "double \fBho_array_get_max\fP (const \fBho_array\fP *pix)" .br .ti -1c .RI "unsigned char \fBho_array_add\fP (\fBho_array\fP *ar1, const \fBho_array\fP *ar2)" .br .ti -1c .RI "unsigned char \fBho_array_add_const\fP (\fBho_array\fP *ar, const double num)" .br .ti -1c .RI "unsigned char \fBho_array_sub\fP (\fBho_array\fP *ar1, const \fBho_array\fP *ar2)" .br .ti -1c .RI "unsigned char \fBho_array_mul\fP (\fBho_array\fP *ar1, const \fBho_array\fP *ar2)" .br .ti -1c .RI "unsigned char \fBho_array_complex_mul\fP (\fBho_array\fP *ar1_r, \fBho_array\fP *ar1_i, const \fBho_array\fP *ar2_r, const \fBho_array\fP *ar2_i)" .br .ti -1c .RI "unsigned char \fBho_array_mul_const\fP (\fBho_array\fP *ar, const double num)" .br .ti -1c .RI "unsigned char \fBho_array_div\fP (\fBho_array\fP *ar1, const \fBho_array\fP *ar2)" .br .ti -1c .RI "unsigned char \fBho_array_inv\fP (\fBho_array\fP *ar)" .br .ti -1c .RI "unsigned char \fBho_array_polerize\fP (\fBho_array\fP *ar, const double treshold)" .br .ti -1c .RI "unsigned char \fBho_array_log\fP (\fBho_array\fP *ar)" .br .ti -1c .RI "unsigned char \fBho_array_streach\fP (\fBho_array\fP *ar)" .br .ti -1c .RI "unsigned char \fBho_array_equl\fP (\fBho_array\fP *ar)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_convolution_filter\fP (const \fBho_array\fP *ar, const \fBho_array\fP *kernel)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_median_filter\fP (const \fBho_array\fP *ar)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_max_filter\fP (const \fBho_array\fP *ar)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_min_filter\fP (const \fBho_array\fP *ar)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_complex_abs\fP (const \fBho_array\fP *ar_r, const \fBho_array\fP *ar_i)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_complex_atan2\fP (const \fBho_array\fP *ar_r, const \fBho_array\fP *ar_i)" .br .ti -1c .RI "unsigned char \fBho_array_gradient\fP (const \fBho_array\fP *ar, \fBho_array\fP *ar_r, \fBho_array\fP *ar_theta)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_hough_circles\fP (const \fBho_array\fP *ar, const int min_radius, const int max_radius, const unsigned char threshold)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_hough_lines\fP (const \fBho_array\fP *ar, const unsigned char threshold)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_hough_lines_backwords\fP (const \fBho_array\fP *ar, const int width, const int height, const unsigned char threshold)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_hough_lines_backwords_by_angle\fP (const \fBho_array\fP *ar, const int width, const int height, const int angle1, const int angle2)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_hough_lines_backwords_by_angle_v\fP (const \fBho_array\fP *ar, const int width, const int height, const int angle1, const int angle2)" .br .ti -1c .RI "unsigned char \fBho_array_fft_forword\fP (const \fBho_array\fP *ar, \fBho_array\fP *ar_r, \fBho_array\fP *ar_im)" .br .ti -1c .RI "unsigned char \fBho_array_fft_backword\fP (const \fBho_array\fP *ar_r, const \fBho_array\fP *ar_im, \fBho_array\fP *ar)" .br .ti -1c .RI "unsigned char \fBho_array_fft_shift\fP (const \fBho_array\fP *ar_r, const \fBho_array\fP *ar_im, \fBho_array\fP *shift_ar_r, \fBho_array\fP *shift_ar_im)" .br .ti -1c .RI "unsigned char \fBho_array_fft_filter\fP (\fBho_array\fP *ar, const \fBho_array\fP *ar_filter)" .br .ti -1c .RI "unsigned char \fBho_array_fft_filter_box\fP (\fBho_array\fP *ar, const int box_width, const int box_height)" .br .ti -1c .RI "unsigned char \fBho_array_fft_filter_circle\fP (\fBho_array\fP *ar, const int radius)" .br .ti -1c .RI "unsigned char \fBho_array_fft_filter_gaussien\fP (\fBho_array\fP *ar, const double sigma)" .br .ti -1c .RI "int \fBho_array_pnm_save\fP (const \fBho_array\fP *ar, const char *filename)" .br .ti -1c .RI "const \fBho_array\fP * \fBho_array_pnm_load\fP (const char *filename)" .br .ti -1c .RI "int \fBho_array_tiff_save\fP (const \fBho_array\fP *ar, const char *filename)" .br .ti -1c .RI "const \fBho_array\fP * \fBho_array_tiff_load\fP (const char *filename)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_new_gaussien\fP (const int width, const int height, const double sigma)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_new_box\fP (const int width, const int height, const int box_width, const int box_height)" .br .ti -1c .RI "\fBho_array\fP * \fBho_array_new_circle\fP (const int width, const int height, const int radius)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_ARRAY_H 1" .PP .SS "#define ho_array_set(m, x, y, val) (((m)->data)[(x)+(y)*(m)->width]=(val))" .PP .SS "#define ho_array_get(m, x, y) (((m)->data)[(x)+(y)*(m)->width])" .PP .SS "#define ho_array_get_width(m) ((m)->width)" .PP .SS "#define ho_array_get_height(m) ((m)->height)" .PP .SS "#define ho_array_get_data(m) ((m)->data)" .PP .SH "Function Documentation" .PP .SS "\fBho_array\fP* ho_array_new (const int width, const int height)" .PP new \fBho_array\fP .PP \fBParameters:\fP .RS 4 \fIheight\fP hight of pixbuf in pixels .br \fIwidth\fP width of pixbuf in pixels .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_array\fP .RE .PP .SS "\fBho_array\fP* ho_array_clone (const \fBho_array\fP * m)" .PP clone \fBho_array\fP .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to a \fBho_array\fP image .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_array\fP .RE .PP .SS "int ho_array_set_data (\fBho_array\fP * pix, double data)" .PP copy pixel data to a \fBho_array\fP .PP \fBParameters:\fP .RS 4 \fIpix\fP pointer to a \fBho_array\fP image .br \fIdata\fP the pixel data to copy .RE .PP \fBReturns:\fP .RS 4 false .RE .PP .SS "int ho_array_set_at (\fBho_array\fP * pix, int x, int y, double data)" .PP copy pixel data to a \fBho_array\fP .PP \fBParameters:\fP .RS 4 \fIpix\fP pointer to a \fBho_array\fP image .br \fIdata\fP the pixel data to copy .br \fIx\fP the pixel x .br \fIy\fP the pixel y .RE .PP \fBReturns:\fP .RS 4 false .RE .PP .SS "double ho_array_get_at (\fBho_array\fP * pix, int x, int y)" .PP get pixel data from a \fBho_array\fP .PP \fBParameters:\fP .RS 4 \fIpix\fP pointer to a \fBho_array\fP image .br \fIx\fP the pixel x .br \fIy\fP the pixel y .RE .PP \fBReturns:\fP .RS 4 false .RE .PP .SS "\fBho_array\fP* ho_array_new_from_pixbuf (const \fBho_pixbuf\fP * pix)" .PP new \fBho_array\fP from \fBho_pixbuf\fP .PP \fBParameters:\fP .RS 4 \fIpix\fP pointer to an \fBho_pixbuf\fP image .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_array\fP .RE .PP .SS "\fBho_array\fP* ho_array_new_from_bitmap (const \fBho_bitmap\fP * pix)" .PP new \fBho_array\fP from \fBho_bitmap\fP .PP \fBParameters:\fP .RS 4 \fIpix\fP pointer to an \fBho_bitmap\fP image .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_array\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_array_to_pixbuf (const \fBho_array\fP * pix_in)" .PP new gray \fBho_pixbuf\fP from \fBho_array\fP .PP \fBParameters:\fP .RS 4 \fIpix_in\fP pointer the original array .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_array_to_rgb_pixbuf (const \fBho_array\fP * pix_in)" .PP new rgb \fBho_pixbuf\fP from \fBho_array\fP .PP \fBParameters:\fP .RS 4 \fIpix_in\fP pointer the original array .RE .PP \fBReturns:\fP .RS 4 newly allocated gray \fBho_pixbuf\fP .RE .PP .SS "int ho_array_free (\fBho_array\fP * pix)" .PP free an \fBho_array\fP .PP \fBParameters:\fP .RS 4 \fIpix\fP pointer to an \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_minmax (const \fBho_array\fP * pix, double * min, double * max)" .PP get the min and max values in a array .PP \fBParameters:\fP .RS 4 \fIpix\fP \fBho_array\fP .br \fImin\fP a pointer to return the min .br \fImax\fP a pointer to return the max .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "double ho_array_get_mean (const \fBho_array\fP * pix)" .PP get the mean value in a array .PP \fBParameters:\fP .RS 4 \fIpix\fP \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 min value .RE .PP .SS "double ho_array_get_min (const \fBho_array\fP * pix)" .PP get the min value in a array .PP \fBParameters:\fP .RS 4 \fIpix\fP \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 min value .RE .PP .SS "double ho_array_get_max (const \fBho_array\fP * pix)" .PP get the max value in a array .PP \fBParameters:\fP .RS 4 \fIpix\fP \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 max value .RE .PP .SS "unsigned char ho_array_add (\fBho_array\fP * ar1, const \fBho_array\fP * ar2)" .PP add two ho arrays .PP \fBParameters:\fP .RS 4 \fIar1\fP left side \fBho_array\fP .br \fIar2\fP right side \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_add_const (\fBho_array\fP * ar, const double num)" .PP add const to ho arrays .PP \fBParameters:\fP .RS 4 \fIar\fP left side \fBho_array\fP .br \fInum\fP a number to add to array .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_sub (\fBho_array\fP * ar1, const \fBho_array\fP * ar2)" .PP subtruct two ho arrays .PP \fBParameters:\fP .RS 4 \fIar1\fP left side \fBho_array\fP .br \fIar2\fP right side \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_mul (\fBho_array\fP * ar1, const \fBho_array\fP * ar2)" .PP multiply two ho arrays .PP \fBParameters:\fP .RS 4 \fIar1\fP left side \fBho_array\fP .br \fIar2\fP right side \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_complex_mul (\fBho_array\fP * ar1_r, \fBho_array\fP * ar1_i, const \fBho_array\fP * ar2_r, const \fBho_array\fP * ar2_i)" .PP multiply two ho real and imagenary ho_arrays pairs .PP \fBParameters:\fP .RS 4 \fIar1_r\fP left side \fBho_array\fP real part .br \fIar1_i\fP left side \fBho_array\fP imagenaryl part .br \fIar2_r\fP right side \fBho_array\fP real part .br \fIar2_i\fP right side \fBho_array\fP imagenary part .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_mul_const (\fBho_array\fP * ar, const double num)" .PP multiply const to ho arrays .PP \fBParameters:\fP .RS 4 \fIar\fP left side \fBho_array\fP .br \fInum\fP a number to multiply to array .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_div (\fBho_array\fP * ar1, const \fBho_array\fP * ar2)" .PP divide two ho arrays .PP \fBParameters:\fP .RS 4 \fIar1\fP left side \fBho_array\fP .br \fIar2\fP right side \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_inv (\fBho_array\fP * ar)" .PP inverse ho array .PP \fBParameters:\fP .RS 4 \fIar\fP \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_polerize (\fBho_array\fP * ar, const double treshold)" .PP polerize ho array .PP \fBParameters:\fP .RS 4 \fIar\fP \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_log (\fBho_array\fP * ar)" .PP do log (ho array + 1) .PP \fBParameters:\fP .RS 4 \fIar\fP \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_streach (\fBho_array\fP * ar)" .PP streach 0..1 .PP \fBParameters:\fP .RS 4 \fIar\fP \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_equl (\fBho_array\fP * ar)" .PP histogram equalization 0..1 .PP \fBParameters:\fP .RS 4 \fIar\fP \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_array\fP* ho_array_convolution_filter (const \fBho_array\fP * ar, const \fBho_array\fP * kernel)" .PP convolution .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to us for the convolution .br \fIkernel\fP a 3x3 kernel \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated ho array .RE .PP .SS "\fBho_array\fP* ho_array_median_filter (const \fBho_array\fP * ar)" .PP median .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to us for median filter .RE .PP \fBReturns:\fP .RS 4 newly allocated ho array .RE .PP .SS "\fBho_array\fP* ho_array_max_filter (const \fBho_array\fP * ar)" .PP max filter .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to us for max filter .RE .PP \fBReturns:\fP .RS 4 newly allocated ho array .RE .PP .SS "\fBho_array\fP* ho_array_min_filter (const \fBho_array\fP * ar)" .PP min filter .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to us for max filter .RE .PP \fBReturns:\fP .RS 4 newly allocated ho array .RE .PP .SS "\fBho_array\fP* ho_array_complex_abs (const \fBho_array\fP * ar_r, const \fBho_array\fP * ar_i)" .PP absulute value .PP \fBParameters:\fP .RS 4 \fIar_r\fP real part \fBho_array\fP .br \fIar_i\fP imagenary part \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated ho array .RE .PP .SS "\fBho_array\fP* ho_array_complex_atan2 (const \fBho_array\fP * ar_r, const \fBho_array\fP * ar_i)" .PP atan2 .PP \fBParameters:\fP .RS 4 \fIar_r\fP real part \fBho_array\fP .br \fIar_i\fP imagenary part \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 newly allocated ho array .RE .PP .SS "unsigned char ho_array_gradient (const \fBho_array\fP * ar, \fBho_array\fP * ar_r, \fBho_array\fP * ar_theta)" .PP gradient .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to us for gradient detection .br \fIar_r\fP return the r value of the gradient .br \fIar_theta\fP return the theta value of the gradient .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_array\fP* ho_array_hough_circles (const \fBho_array\fP * ar, const int min_radius, const int max_radius, const unsigned char threshold)" .PP hough trasform for circles .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to us for gradient detection .br \fImin_radius\fP the circles min radius .br \fImax_radius\fP the circles max radius .br \fIthreshold\fP the min value to use in the gradient matrix percent .RE .PP \fBReturns:\fP .RS 4 the transformed matrix .RE .PP .SS "\fBho_array\fP* ho_array_hough_lines (const \fBho_array\fP * ar, const unsigned char threshold)" .PP hough trasform for lines .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to use for gradient detection .br \fIthreshold\fP the min value to use in the gradient matrix percent .RE .PP \fBReturns:\fP .RS 4 the transformed matrix .RE .PP .SS "\fBho_array\fP* ho_array_hough_lines_backwords (const \fBho_array\fP * ar, const int width, const int height, const unsigned char threshold)" .PP backwords hough trasform for lines .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to use for backword hough .br \fIwidth\fP the array height .br \fIheight\fP the array height .RE .PP \fBReturns:\fP .RS 4 the backword transformed matrix .RE .PP .SS "\fBho_array\fP* ho_array_hough_lines_backwords_by_angle (const \fBho_array\fP * ar, const int width, const int height, const int angle1, const int angle2)" .PP backwords hough trasform for lines by angle .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to use for backword hough .br \fIwidth\fP the array height .br \fIheight\fP the array height .br \fIangle1\fP start line angle .br \fIangle2\fP end line angle .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_array\fP* ho_array_hough_lines_backwords_by_angle_v (const \fBho_array\fP * ar, const int width, const int height, const int angle1, const int angle2)" .PP backwords hough trasform for lines by vertical angle .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to use for backword hough .br \fIwidth\fP the array height .br \fIheight\fP the array height .br \fIangle1\fP start line angle .br \fIangle2\fP end line angle .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_fft_forword (const \fBho_array\fP * ar, \fBho_array\fP * ar_r, \fBho_array\fP * ar_im)" .PP fft_forword .PP \fBParameters:\fP .RS 4 \fIar\fP the \fBho_array\fP to us for fft .br \fIar_re\fP the output real values .br \fIar_im\fP the output imaginary values .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_fft_backword (const \fBho_array\fP * ar_r, const \fBho_array\fP * ar_im, \fBho_array\fP * ar)" .PP fft_backword .PP \fBParameters:\fP .RS 4 \fIar_re\fP input array of the real values .br \fIar_im\fP input array of the imaginary values .br \fIar\fP the output \fBho_array\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_fft_shift (const \fBho_array\fP * ar_r, const \fBho_array\fP * ar_im, \fBho_array\fP * shift_ar_r, \fBho_array\fP * shift_ar_im)" .PP fft_shift .PP \fBParameters:\fP .RS 4 \fIar_re\fP input array of the real values .br \fIar_im\fP input array of the imaginary values .br \fIshift_ar_re\fP output array of the real values .br \fIshift_ar_im\fP output array of the imaginary values .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_fft_filter (\fBho_array\fP * ar, const \fBho_array\fP * ar_filter)" .PP fft_filter - applay a filter in w space .PP \fBParameters:\fP .RS 4 \fIar\fP input array .br \fIar_filter\fP input array of the filter .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_fft_filter_box (\fBho_array\fP * ar, const int box_width, const int box_height)" .PP fft_filter - applay a box filter in w space .PP \fBParameters:\fP .RS 4 \fIar\fP input array .br \fIbox_height\fP height of box .br \fIbox_width\fP width of box .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_fft_filter_circle (\fBho_array\fP * ar, const int radius)" .PP fft_filter - applay a circle filter in w space .PP \fBParameters:\fP .RS 4 \fIar\fP input array .br \fIradius\fP radius of circle .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "unsigned char ho_array_fft_filter_gaussien (\fBho_array\fP * ar, const double sigma)" .PP fft_filter - applay a gaussien filter in w space .PP \fBParameters:\fP .RS 4 \fIar\fP input array .br \fIsigma\fP of gaussien .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_array_pnm_save (const \fBho_array\fP * ar, const char * filename)" .PP writes \fBho_array\fP to pnm file .PP \fBParameters:\fP .RS 4 \fIar\fP \fBho_array\fP to save as gray image .br \fIfilename\fP save as file name .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "const \fBho_array\fP* ho_array_pnm_load (const char * filename)" .PP load \fBho_array\fP from pnm file .PP \fBParameters:\fP .RS 4 \fIfilename\fP save as file name .RE .PP \fBReturns:\fP .RS 4 new \fBho_array\fP .RE .PP .SS "int ho_array_tiff_save (const \fBho_array\fP * ar, const char * filename)" .PP writes \fBho_array\fP to tiff file .PP \fBParameters:\fP .RS 4 \fIar\fP \fBho_array\fP to save as gray image .br \fIfilename\fP save as file name .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "const \fBho_array\fP* ho_array_tiff_load (const char * filename)" .PP load \fBho_array\fP from tiff file .PP \fBParameters:\fP .RS 4 \fIfilename\fP save as file name .RE .PP \fBReturns:\fP .RS 4 new \fBho_array\fP .RE .PP .SS "\fBho_array\fP* ho_array_new_gaussien (const int width, const int height, const double sigma)" .PP new \fBho_array\fP init to gaussian .PP \fBParameters:\fP .RS 4 \fIheight\fP hight of pixbuf in pixels .br \fIwidth\fP width of pixbuf in pixels .br \fIsigma\fP the sigma to use in the gaussien .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_array\fP .RE .PP .SS "\fBho_array\fP* ho_array_new_box (const int width, const int height, const int box_width, const int box_height)" .PP new \fBho_array\fP init to box .PP \fBParameters:\fP .RS 4 \fIheight\fP hight of pixbuf in pixels .br \fIwidth\fP width of pixbuf in pixels .br \fIbox_height\fP height of box .br \fIbox_width\fP width of box .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_array\fP .RE .PP .SS "\fBho_array\fP* ho_array_new_circle (const int width, const int height, const int radius)" .PP new \fBho_array\fP init to circle .PP \fBParameters:\fP .RS 4 \fIheight\fP hight of pixbuf in pixels .br \fIwidth\fP width of pixbuf in pixels .br \fIradius\fP radius of circle .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_array\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_gtk.h.30000644000175000017500000000612511044261550014353 00000000000000.TH "src/ho_gtk.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_gtk.h \- libhocr C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_GTK_H\fP 1" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_pixbuf\fP * \fBho_gtk_pixbuf_from_gdk\fP (const GdkPixbuf *gdk_pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_gtk_pixbuf_from_gdk_share_data\fP (const GdkPixbuf *gdk_pix)" .br .ti -1c .RI "GdkPixbuf * \fBho_gtk_pixbuf_to_gdk\fP (const \fBho_pixbuf\fP *hocr_pix)" .br .ti -1c .RI "\fBho_pixbuf\fP * \fBho_gtk_pixbuf_load\fP (const char *filename)" .br .ti -1c .RI "int \fBho_gtk_pixbuf_save\fP (const \fBho_pixbuf\fP *pix, const char *filename, const char *ext)" .br .ti -1c .RI "int \fBho_gtk_font_save\fP (const \fBho_bitmap\fP *m_text, const \fBho_bitmap\fP *m_nikud, const \fBho_bitmap\fP *m_mask, const char *filename, const char *ext)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_GTK_H 1" .PP .SH "Function Documentation" .PP .SS "\fBho_pixbuf\fP* ho_gtk_pixbuf_from_gdk (const GdkPixbuf * gdk_pix)" .PP new \fBho_pixbuf\fP from a gdk_pixbuf .PP \fBParameters:\fP .RS 4 \fIgdk_pix\fP the pixbuf to copy .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_pixbuf\fP .RE .PP .SS "\fBho_pixbuf\fP* ho_gtk_pixbuf_from_gdk_share_data (const GdkPixbuf * gdk_pix)" .PP new \fBho_pixbuf\fP from a gdk_pixbuf .PP \fBParameters:\fP .RS 4 \fIgdk_pix\fP the pixbuf to share data with .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_pixbuf\fP, share data with gtk pixbuf .RE .PP .SS "GdkPixbuf* ho_gtk_pixbuf_to_gdk (const \fBho_pixbuf\fP * hocr_pix)" .PP new gdk_pixbuf from a \fBho_pixbuf\fP .PP \fBParameters:\fP .RS 4 \fIhocr_pix\fP the pixbuf to copy .RE .PP \fBReturns:\fP .RS 4 newly allocated gdk_pixbuf .RE .PP .SS "\fBho_pixbuf\fP* ho_gtk_pixbuf_load (const char * filename)" .PP read \fBho_pixbuf\fP from file .PP \fBParameters:\fP .RS 4 \fIfilename\fP file name .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_pixbuf\fP .RE .PP .SS "int ho_gtk_pixbuf_save (const \fBho_pixbuf\fP * pix, const char * filename, const char * ext)" .PP writes \fBho_pixbuf\fP to file .PP \fBParameters:\fP .RS 4 \fIpix\fP \fBho_pixbuf\fP 8 or 24 bpp .br \fIfilename\fP save as file name .br \fIext\fP file type extention, e.g jpeg, png ... .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_gtk_font_save (const \fBho_bitmap\fP * m_text, const \fBho_bitmap\fP * m_nikud, const \fBho_bitmap\fP * m_mask, const char * filename, const char * ext)" .PP writes font to file .PP \fBParameters:\fP .RS 4 \fIm_text\fP \fBho_bitmap\fP of main font .br \fIm_nikud\fP \fBho_bitmap\fP of nikud .br \fIm_mask\fP \fBho_bitmap\fP of line .br \fIfilename\fP save as file name .br \fIext\fP file type extention, e.g jpeg, png ... .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_bitmap.h.30000644000175000017500000005001211044261550015034 00000000000000.TH "src/ho_bitmap.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_bitmap.h \- libhocr C language header. .SH SYNOPSIS .br .PP .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBho_bitmap\fP" .br .RI "\fIlibhocr bitmap struct \fP" .in -1c .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_BITMAP_H\fP 1" .br .ti -1c .RI "#define \fBho_bitmap_get\fP(m, x, y) (((((m)->data[(x) / 8 + (y) * (m)->rowstride]) & (0x80 >> ((x) % 8))) > 0)?1:0)" .br .ti -1c .RI "#define \fBho_bitmap_set\fP(m, x, y) (((m)->data[(x) / 8 + (y) * (m)->rowstride]) |= (0x80 >> ((x) % 8)))" .br .ti -1c .RI "#define \fBho_bitmap_unset\fP(m, x, y) (((m)->data[(x) / 8 + (y) * (m)->rowstride]) &= ~(0x80 >> ((x) % 8)))" .br .ti -1c .RI "#define \fBho_bitmap_get_x\fP(m) ((m)->x)" .br .ti -1c .RI "#define \fBho_bitmap_get_y\fP(m) ((m)->y)" .br .ti -1c .RI "#define \fBho_bitmap_set_x\fP(m, new_x) ((m)->x=(new_x))" .br .ti -1c .RI "#define \fBho_bitmap_set_y\fP(m, new_y) ((m)->y=(new_y))" .br .ti -1c .RI "#define \fBho_bitmap_get_width\fP(m) ((m)->width)" .br .ti -1c .RI "#define \fBho_bitmap_get_height\fP(m) ((m)->height)" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_new\fP (const int width, const int height)" .br .ti -1c .RI "int \fBho_bitmap_free\fP (\fBho_bitmap\fP *m)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_clone\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_clone_window\fP (const \fBho_bitmap\fP *m, const int x, const int y, const int width, const int height)" .br .ti -1c .RI "int \fBho_bitmap_and\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)" .br .ti -1c .RI "int \fBho_bitmap_or\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)" .br .ti -1c .RI "int \fBho_bitmap_xor\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)" .br .ti -1c .RI "int \fBho_bitmap_andnot\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)" .br .ti -1c .RI "int \fBho_bitmap_copy\fP (\fBho_bitmap\fP *m_left, const \fBho_bitmap\fP *m_right)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_not\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_dilation_n\fP (const \fBho_bitmap\fP *m, const unsigned char n)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_erosion_n\fP (const \fBho_bitmap\fP *m, const unsigned char n)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_set_height\fP (const \fBho_bitmap\fP *m, const int height, const int top, const int bottom)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_set_height_from_bottom\fP (const \fBho_bitmap\fP *m, const int height, const int top, const int bottom)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_dilation\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_erosion\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_opening\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_closing\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_hlink\fP (const \fBho_bitmap\fP *m, const int size)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_herode\fP (const \fBho_bitmap\fP *m, const int size)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_vlink\fP (const \fBho_bitmap\fP *m, const int size)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_edge\fP (const \fBho_bitmap\fP *m, const int n)" .br .ti -1c .RI "double \fBho_bitmap_get_fill\fP (const \fBho_bitmap\fP *m, const int x, const int y, const int width, const int height)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_filter_hlink\fP (\fBho_bitmap\fP *m, int size, int max_height)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_filter_by_size\fP (const \fBho_bitmap\fP *m, int min_height, int max_height, int min_width, int max_width)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_filter_boxes\fP (const \fBho_bitmap\fP *m, const int leeway_down, const int leeway_up)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_filter_fill\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_filter_set_height\fP (const \fBho_bitmap\fP *m, const int height, const int top, const int bottom)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_filter_set_height_from_bottom\fP (const \fBho_bitmap\fP *m, const int height, const int top, const int bottom)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_filter_obj_extend_lateraly\fP (const \fBho_bitmap\fP *m, const int ext_width)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_filter_remove_dots\fP (const \fBho_bitmap\fP *m, const unsigned char erosion_n, const unsigned char dilation_n)" .br .ti -1c .RI "int \fBho_bitmap_filter_count_objects\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "int \fBho_bitmap_draw_box\fP (\fBho_bitmap\fP *m, const int x, const int y, const int width, const int height)" .br .ti -1c .RI "int \fBho_bitmap_draw_box_empty\fP (\fBho_bitmap\fP *m, const int x, const int y, const int width, const int height)" .br .ti -1c .RI "int \fBho_bitmap_draw_vline\fP (\fBho_bitmap\fP *m, const int x, const int y, const int height)" .br .ti -1c .RI "int \fBho_bitmap_delete_vline\fP (\fBho_bitmap\fP *m, const int x, const int y, const int height)" .br .ti -1c .RI "int \fBho_bitmap_draw_hline\fP (\fBho_bitmap\fP *m, const int x, const int y, const int width)" .br .ti -1c .RI "int \fBho_bitmap_delete_hline\fP (\fBho_bitmap\fP *m, const int x, const int y, const int width)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_bitmap_rotate\fP (const \fBho_bitmap\fP *m, const double angle)" .br .ti -1c .RI "int \fBho_bitmap_pnm_save\fP (const \fBho_bitmap\fP *m, const char *filename)" .br .ti -1c .RI "int \fBho_bitmap_tiff_save\fP (const \fBho_bitmap\fP *m, const char *filename)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_BITMAP_H 1" .PP .SS "#define ho_bitmap_get(m, x, y) (((((m)->data[(x) / 8 + (y) * (m)->rowstride]) & (0x80 >> ((x) % 8))) > 0)?1:0)" .PP .SS "#define ho_bitmap_set(m, x, y) (((m)->data[(x) / 8 + (y) * (m)->rowstride]) |= (0x80 >> ((x) % 8)))" .PP .SS "#define ho_bitmap_unset(m, x, y) (((m)->data[(x) / 8 + (y) * (m)->rowstride]) &= ~(0x80 >> ((x) % 8)))" .PP .SS "#define ho_bitmap_get_x(m) ((m)->x)" .PP .SS "#define ho_bitmap_get_y(m) ((m)->y)" .PP .SS "#define ho_bitmap_set_x(m, new_x) ((m)->x=(new_x))" .PP .SS "#define ho_bitmap_set_y(m, new_y) ((m)->y=(new_y))" .PP .SS "#define ho_bitmap_get_width(m) ((m)->width)" .PP .SS "#define ho_bitmap_get_height(m) ((m)->height)" .PP .SH "Function Documentation" .PP .SS "\fBho_bitmap\fP* ho_bitmap_new (const int width, const int height)" .PP new ho_bitamp .PP \fBParameters:\fP .RS 4 \fIheight\fP hight of pixbuf in pixels .br \fIwidth\fP width of pixbuf in pixels .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "int ho_bitmap_free (\fBho_bitmap\fP * m)" .PP free an \fBho_bitmap\fP .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .PP Referenced by hocr::Hocr::do_bitmap_closing(), hocr::Hocr::do_bitmap_dilation(), hocr::Hocr::do_bitmap_erosion(), hocr::Hocr::do_bitmap_opening(), hocr::Hocr::do_image_processing(), hocr::Hocr::set_bitmap(), hocr::Hocr::set_pixbuf(), and hocr::Hocr::~Hocr(). .SS "\fBho_bitmap\fP* ho_bitmap_clone (const \fBho_bitmap\fP * m)" .PP copy a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to copy .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_clone_window (const \fBho_bitmap\fP * m, const int x, const int y, const int width, const int height)" .PP copy a window from a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to copy .br \fIx\fP x-start of window .br \fIy\fP y-start of window .br \fIwidth\fP width of window .br \fIheight\fP height of window .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "int ho_bitmap_and (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)" .PP do bitwise and of two bitmaps .PP \fBParameters:\fP .RS 4 \fIm_left\fP the left hand bitmap .br \fIm_right\fP the right hand bitmap .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_bitmap_or (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)" .PP do bitwise or of two bitmaps .PP \fBParameters:\fP .RS 4 \fIm_left\fP the left hand bitmap .br \fIm_right\fP the right hand bitmap .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_bitmap_xor (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)" .PP do bitwise xor of two bitmaps .PP \fBParameters:\fP .RS 4 \fIm_left\fP the left hand bitmap .br \fIm_right\fP the right hand bitmap .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_bitmap_andnot (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)" .PP do bitwise and not of two bitmaps .PP \fBParameters:\fP .RS 4 \fIm_left\fP the left hand bitmap .br \fIm_right\fP the right hand bitmap .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_bitmap_copy (\fBho_bitmap\fP * m_left, const \fBho_bitmap\fP * m_right)" .PP do bitwise copy of two bitmaps .PP \fBParameters:\fP .RS 4 \fIm_left\fP the left hand bitmap .br \fIm_right\fP the right hand bitmap .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_not (const \fBho_bitmap\fP * m)" .PP do bitwise not of a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the left hand bitmap .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_dilation_n (const \fBho_bitmap\fP * m, const unsigned char n)" .PP dilation of a a bitmap with 3x3 box .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to dilate .br \fIn\fP dilation constant .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_erosion_n (const \fBho_bitmap\fP * m, const unsigned char n)" .PP erosion of a a bitmap with 3x3 box .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to erode .br \fIn\fP erosion constant .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_set_height (const \fBho_bitmap\fP * m, const int height, const int top, const int bottom)" .PP take only top height black pixels of bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to erode .br \fIheight\fP the height to take .br \fItop\fP space above black pixel included in new object .br \fIbottom\fP space below black pixel included in new object .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_set_height_from_bottom (const \fBho_bitmap\fP * m, const int height, const int top, const int bottom)" .PP take only bottom height black pixels of bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to erode .br \fIheight\fP the height to take .br \fItop\fP space above black pixel included in new object .br \fIbottom\fP space below black pixel included in new object .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_dilation (const \fBho_bitmap\fP * m)" .PP dilation of a a bitmap with 3x3 box .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to dilate .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .PP Referenced by hocr::Hocr::do_bitmap_dilation(). .SS "\fBho_bitmap\fP* ho_bitmap_erosion (const \fBho_bitmap\fP * m)" .PP erosion of a a bitmap with 3x3 box .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to erode .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .PP Referenced by hocr::Hocr::do_bitmap_erosion(). .SS "\fBho_bitmap\fP* ho_bitmap_opening (const \fBho_bitmap\fP * m)" .PP opening of a a bitmap with 3x3 box .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to open .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .PP Referenced by hocr::Hocr::do_bitmap_opening(). .SS "\fBho_bitmap\fP* ho_bitmap_closing (const \fBho_bitmap\fP * m)" .PP closing of a a bitmap with 3x3 box .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to close .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .PP Referenced by hocr::Hocr::do_bitmap_closing(). .SS "\fBho_bitmap\fP* ho_bitmap_hlink (const \fBho_bitmap\fP * m, const int size)" .PP horizontaly link black dots in a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to horizontaly link .br \fIsize\fP maximum distance .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_herode (const \fBho_bitmap\fP * m, const int size)" .PP horizontaly erode black dots in a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to horizontaly link .br \fIsize\fP maximum distance .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_vlink (const \fBho_bitmap\fP * m, const int size)" .PP verticaly link black dots in a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to verticaly link .br \fIsize\fP maximum distance .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_edge (const \fBho_bitmap\fP * m, const int n)" .PP copy edges in bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIn\fP width of egde .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "double ho_bitmap_get_fill (const \fBho_bitmap\fP * m, const int x, const int y, const int width, const int height)" .PP return the ratio fill/volume value of a rectangle in the bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIx\fP x of rectangel .br \fIy\fP y of rectangel .br \fIwidth\fP width of rectangel .br \fIheight\fP height of rectangel .RE .PP \fBReturns:\fP .RS 4 the ratio value .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_filter_hlink (\fBho_bitmap\fP * m, int size, int max_height)" .PP horizontaly link short objects in a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to horizontaly link .br \fIsize\fP maximum distance .br \fImax_height\fP maximum hight of objects to link .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_filter_by_size (const \fBho_bitmap\fP * m, int min_height, int max_height, int min_width, int max_width)" .PP copy objects from bitmap to bitmap by size .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fImin_height\fP only objects with this minimal height are copied .br \fImax_height\fP only objects with this maximal height are copied .br \fImin_width\fP only objects with this minimal width are copied .br \fImax_width\fP only objects with this maximal width are copied .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_filter_boxes (const \fBho_bitmap\fP * m, const int leeway_down, const int leeway_up)" .PP copy boxed objects from bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIleeway_down\fP space below object to be included in box .br \fIleeway_up\fP space above object to be included in box .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_filter_fill (const \fBho_bitmap\fP * m)" .PP copy filled objects from bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_filter_set_height (const \fBho_bitmap\fP * m, const int height, const int top, const int bottom)" .PP take height top pixels from objects in bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIheight\fP of new objects .br \fItop\fP space above black pixel included in new object .br \fIbottom\fP space below black pixel included in new object .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_filter_set_height_from_bottom (const \fBho_bitmap\fP * m, const int height, const int top, const int bottom)" .PP take height bottom pixels from objects in bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIheight\fP of new objects .br \fItop\fP space above black pixel included in new object .br \fIbottom\fP space below black pixel included in new object .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_filter_obj_extend_lateraly (const \fBho_bitmap\fP * m, const int ext_width)" .PP take extend objects lateraly .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIext_width\fP width of lateral extention .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_filter_remove_dots (const \fBho_bitmap\fP * m, const unsigned char erosion_n, const unsigned char dilation_n)" .PP remove halftone dots from bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIerosion_n\fP the erosion operator factor .br \fIdilation_n\fP the dilation operator factor .RE .PP \fBReturns:\fP .RS 4 a newly allocated bitmap .RE .PP .SS "int ho_bitmap_filter_count_objects (const \fBho_bitmap\fP * m)" .PP count the number of objects in a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .RE .PP \fBReturns:\fP .RS 4 the number of objects in a bitmap .RE .PP .SS "int ho_bitmap_draw_box (\fBho_bitmap\fP * m, const int x, const int y, const int width, const int height)" .PP draw a black box on bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to draw on .br \fIx\fP x-start of box .br \fIy\fP y-start of box .br \fIwidth\fP width of box .br \fIheight\fP height of box .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_bitmap_draw_box_empty (\fBho_bitmap\fP * m, const int x, const int y, const int width, const int height)" .PP draw a black empty box on bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to draw on .br \fIx\fP x-start of box .br \fIy\fP y-start of box .br \fIwidth\fP width of box .br \fIheight\fP height of box .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_bitmap_draw_vline (\fBho_bitmap\fP * m, const int x, const int y, const int height)" .PP draw vertical line on bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to draw on .br \fIx\fP x-start of line .br \fIy\fP y-start of line .br \fIheight\fP height of line .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_bitmap_delete_vline (\fBho_bitmap\fP * m, const int x, const int y, const int height)" .PP delete vertical line on bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to draw on .br \fIx\fP x-start of line .br \fIy\fP y-start of line .br \fIheight\fP height of line .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_bitmap_draw_hline (\fBho_bitmap\fP * m, const int x, const int y, const int width)" .PP draw horizontal line on bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to draw on .br \fIx\fP x-start of line .br \fIy\fP y-start of line .br \fIwidth\fP height of line .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_bitmap_delete_hline (\fBho_bitmap\fP * m, const int x, const int y, const int width)" .PP delete horizontal line on bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to draw on .br \fIx\fP x-start of line .br \fIy\fP y-start of line .br \fIwidth\fP height of line .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_bitmap\fP* ho_bitmap_rotate (const \fBho_bitmap\fP * m, const double angle)" .PP rotate a bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP the bitmap to rotate .br \fIangle\fP the angle in deg. .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "int ho_bitmap_pnm_save (const \fBho_bitmap\fP * m, const char * filename)" .PP writes \fBho_bitmap\fP to pnm file .PP \fBParameters:\fP .RS 4 \fIm\fP \fBho_bitmap\fP 1 bpp .br \fIfilename\fP save as file name .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .PP Referenced by hocr::Hocr::save_bitmap_as_pnm(). .SS "int ho_bitmap_tiff_save (const \fBho_bitmap\fP * m, const char * filename)" .PP writes \fBho_bitmap\fP to tiff file .PP \fBParameters:\fP .RS 4 \fIm\fP \fBho_bitmap\fP 1 bpp .br \fIfilename\fP save as file name .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .PP Referenced by hocr::Hocr::save_bitmap_as_tiff(). .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_objmap.30000644000175000017500000000153011044261550014603 00000000000000.TH "ho_objmap" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME ho_objmap \- libhocr object map struct .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP .SS "Data Fields" .in +1c .ti -1c .RI "int \fBx\fP" .br .ti -1c .RI "int \fBy\fP" .br .ti -1c .RI "int \fBheight\fP" .br .ti -1c .RI "int \fBwidth\fP" .br .ti -1c .RI "int * \fBmap\fP" .br .ti -1c .RI "\fBho_objlist\fP * \fBobj_list\fP" .br .in -1c .SH "Detailed Description" .PP libhocr object map struct .SH "Field Documentation" .PP .SS "int \fBho_objmap::x\fP" .PP .SS "int \fBho_objmap::y\fP" .PP .SS "int \fBho_objmap::height\fP" .PP .SS "int \fBho_objmap::width\fP" .PP .SS "int* \fBho_objmap::map\fP" .PP .SS "\fBho_objlist\fP* \fBho_objmap::obj_list\fP" .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/hocr.30000644000175000017500000000070311044261550013601 00000000000000.TH "hocr" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME hocr \- the libhocr namespace. .PP .SH SYNOPSIS .br .PP .SS "Data Structures" .in +1c .ti -1c .RI "class \fBHocr\fP" .br .RI "\fI\fBHocr\fP class. \fP" .in -1c .SH "Detailed Description" .PP the libhocr namespace. namespace for Hebrew Optical Character Recognition .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_layout.h.30000644000175000017500000001737611044261550015115 00000000000000.TH "src/ho_layout.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_layout.h \- libhocr C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBho_layout\fP" .br .RI "\fIlibhocr layout struct \fP" .in -1c .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_LAYOUT_H\fP 1" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBho_layout\fP * \fBho_layout_new\fP (const \fBho_bitmap\fP *m_page_text, const char font_spacing_code, const unsigned char type, const unsigned char dir)" .br .ti -1c .RI "int \fBho_layout_free\fP (\fBho_layout\fP *l_page)" .br .ti -1c .RI "int \fBho_layout_create_block_mask\fP (\fBho_layout\fP *l_page)" .br .ti -1c .RI "int \fBho_layout_create_line_mask\fP (\fBho_layout\fP *l_page, const int block_index)" .br .ti -1c .RI "int \fBho_layout_create_word_mask\fP (\fBho_layout\fP *l_page, const int block_index, const int line_index)" .br .ti -1c .RI "int \fBho_layout_create_font_mask\fP (\fBho_layout\fP *l_page, const int block_index, const int line_index, const int word_index, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_layout_get_block_text\fP (const \fBho_layout\fP *l_page, int block_index)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_layout_get_line_text\fP (const \fBho_layout\fP *l_page, int block_index, int line_index)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_layout_get_word_text\fP (const \fBho_layout\fP *l_page, int block_index, int line_index, int word_index)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_layout_get_font_text\fP (const \fBho_layout\fP *l_page, int block_index, int line_index, int word_index, int font_index)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_layout_get_line_line_mask\fP (const \fBho_layout\fP *l_page, int block_index, int line_index)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_layout_get_word_line_mask\fP (const \fBho_layout\fP *l_page, int block_index, int line_index, int word_index)" .br .ti -1c .RI "\fBho_bitmap\fP * \fBho_layout_get_font_line_mask\fP (const \fBho_layout\fP *l_page, int block_index, int line_index, int word_index, int font_index)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_LAYOUT_H 1" .PP .SH "Function Documentation" .PP .SS "\fBho_layout\fP* ho_layout_new (const \fBho_bitmap\fP * m_page_text, const char font_spacing_code, const unsigned char type, const unsigned char dir)" .PP new \fBho_layout\fP .PP \fBParameters:\fP .RS 4 \fIm_page_text\fP a pointer to a text bitmap .br \fIfont_spacing_code\fP -3 tight .. 0 .. 3 spaced .br \fItype\fP free text blocks or boxed .br \fIdir\fP true-ltr false-rtl .RE .PP \fBReturns:\fP .RS 4 a newly allocated layout .RE .PP .SS "int ho_layout_free (\fBho_layout\fP * l_page)" .PP free a \fBho_layout\fP .PP \fBParameters:\fP .RS 4 \fIl_page\fP a pointer to a \fBho_layout\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .PP Referenced by hocr::Hocr::do_layout_analysis(), hocr::Hocr::set_bitmap(), hocr::Hocr::set_pixbuf(), and hocr::Hocr::~Hocr(). .SS "int ho_layout_create_block_mask (\fBho_layout\fP * l_page)" .PP create a text blocks mask and count blocks in n_blocks .PP \fBParameters:\fP .RS 4 \fIl_page\fP a pointer to a \fBho_layout\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_layout_create_line_mask (\fBho_layout\fP * l_page, const int block_index)" .PP create a text lines mask and count lines in n_lines[block_index] .PP \fBParameters:\fP .RS 4 \fIl_page\fP a pointer to a \fBho_layout\fP .br \fIblock_index\fP the block_index to work on .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_layout_create_word_mask (\fBho_layout\fP * l_page, const int block_index, const int line_index)" .PP create a text word mask and count words in n_words[block_index][line_index] .PP \fBParameters:\fP .RS 4 \fIl_page\fP a pointer to a \fBho_layout\fP .br \fIblock_index\fP the block_index to work on .br \fIline_index\fP the line_index to work on .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_layout_create_font_mask (\fBho_layout\fP * l_page, const int block_index, const int line_index, const int word_index, const unsigned char slicing_threshold, const unsigned char slicing_width, const unsigned char line_leeway)" .PP create a text font mask and count fonts in n_fontss[block_index][line_index][word_index] .PP \fBParameters:\fP .RS 4 \fIl_page\fP a pointer to a \fBho_layout\fP .br \fIblock_index\fP the block_index to work on .br \fIline_index\fP the line_index to work on .br \fIword_index\fP the word_index to work on .br \fIslicing_threshold\fP the slicing threshold .br \fIslicing_width\fP the slicing width .br \fIline_leeway\fP the line leeway below and above line .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "\fBho_bitmap\fP* ho_layout_get_block_text (const \fBho_layout\fP * l_page, int block_index)" .PP new ho_bitamp of the text in a layout block .PP \fBParameters:\fP .RS 4 \fIl_page\fP the \fBho_layout\fP to use .br \fIblock_index\fP block index .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_layout_get_line_text (const \fBho_layout\fP * l_page, int block_index, int line_index)" .PP new ho_bitamp of the text in a layout line .PP \fBParameters:\fP .RS 4 \fIl_page\fP the \fBho_layout\fP to use .br \fIblock_index\fP block index .br \fIline_index\fP line index .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_layout_get_word_text (const \fBho_layout\fP * l_page, int block_index, int line_index, int word_index)" .PP new ho_bitamp of the text in a layout word .PP \fBParameters:\fP .RS 4 \fIl_page\fP the \fBho_layout\fP to use .br \fIblock_index\fP block index .br \fIline_index\fP line index .br \fIword_index\fP word index .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_layout_get_font_text (const \fBho_layout\fP * l_page, int block_index, int line_index, int word_index, int font_index)" .PP new ho_bitamp of the text in a layout font .PP \fBParameters:\fP .RS 4 \fIl_page\fP the \fBho_layout\fP to use .br \fIblock_index\fP block index .br \fIline_index\fP line index .br \fIword_index\fP word index .br \fIfont_index\fP font index .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_layout_get_line_line_mask (const \fBho_layout\fP * l_page, int block_index, int line_index)" .PP new ho_bitamp of the line in a layout line .PP \fBParameters:\fP .RS 4 \fIl_page\fP the \fBho_layout\fP to use .br \fIblock_index\fP block index .br \fIline_index\fP line index .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_layout_get_word_line_mask (const \fBho_layout\fP * l_page, int block_index, int line_index, int word_index)" .PP new ho_bitamp of the line in a layout word .PP \fBParameters:\fP .RS 4 \fIl_page\fP the \fBho_layout\fP to use .br \fIblock_index\fP block index .br \fIline_index\fP line index .br \fIword_index\fP word index .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SS "\fBho_bitmap\fP* ho_layout_get_font_line_mask (const \fBho_layout\fP * l_page, int block_index, int line_index, int word_index, int font_index)" .PP new ho_bitamp of the line in a layout font .PP \fBParameters:\fP .RS 4 \fIl_page\fP the \fBho_layout\fP to use .br \fIblock_index\fP block index .br \fIline_index\fP line index .br \fIword_index\fP word index .br \fIfont_index\fP font index .RE .PP \fBReturns:\fP .RS 4 newly allocated \fBho_bitmap\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/hocr_Hocr.30000644000175000017500000003355511044261550014567 00000000000000.TH "hocr::Hocr" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME hocr::Hocr \- \fBHocr\fP class. .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBHocr\fP (\fBho_pixbuf\fP *m_in=NULL)" .br .RI "\fI\fBHocr\fP constructor. \fP" .ti -1c .RI "\fB~Hocr\fP ()" .br .RI "\fI\fBHocr\fP destructor. \fP" .ti -1c .RI "int \fBset_pixbuf\fP (\fBho_pixbuf\fP *m_in)" .br .RI "\fIset pixbuf \fP" .ti -1c .RI "int \fBset_bitmap\fP (\fBho_bitmap\fP *m_in)" .br .RI "\fIset b/w bitmap \fP" .ti -1c .RI "\fBho_pixbuf\fP * \fBget_pixbuf\fP ()" .br .RI "\fIget pixbuf \fP" .ti -1c .RI "\fBho_bitmap\fP * \fBget_bitmap\fP ()" .br .RI "\fIget bitmap \fP" .ti -1c .RI "int \fBsave_bitmap_as_pnm\fP (const char *filename)" .br .RI "\fIsave bitmap as pnm \fP" .ti -1c .RI "int \fBsave_bitmap_as_tiff\fP (const char *filename)" .br .RI "\fIsave bitmap as tiff (neads a tiff enabled libhocr) \fP" .ti -1c .RI "\fBho_pixbuf\fP * \fBget_bitmap_pixbuf\fP ()" .br .RI "\fIget bitmap pixbuf \fP" .ti -1c .RI "\fBho_pixbuf\fP * \fBget_layout_pixbuf\fP ()" .br .RI "\fIget layout pixbuf \fP" .ti -1c .RI "const char * \fBget_text\fP ()" .br .RI "\fIget text \fP" .ti -1c .RI "int \fBget_progress\fP ()" .br .RI "\fIget progress of ocr \fP" .ti -1c .RI "int \fBdo_image_processing\fP ()" .br .RI "\fIdo image processing \fP" .ti -1c .RI "int \fBdo_bitmap_closing\fP ()" .br .RI "\fIdo bitmap closing \fP" .ti -1c .RI "int \fBdo_bitmap_opening\fP ()" .br .RI "\fIdo bitmap opening \fP" .ti -1c .RI "int \fBdo_bitmap_erosion\fP ()" .br .RI "\fIdo bitmap erosion \fP" .ti -1c .RI "int \fBdo_bitmap_dilation\fP ()" .br .RI "\fIdo bitmap dilation \fP" .ti -1c .RI "int \fBdo_layout_analysis\fP ()" .br .RI "\fIdo layout analysis \fP" .ti -1c .RI "int \fBdo_font_recognition\fP ()" .br .RI "\fIdo font recognition \fP" .ti -1c .RI "int \fBdo_ocr\fP ()" .br .RI "\fIdo ocr \fP" .ti -1c .RI "int \fBget_html\fP ()" .br .RI "\fIget html param \fP" .ti -1c .RI "int \fBset_html\fP (const unsigned char html_in)" .br .RI "\fIset html param \fP" .ti -1c .RI "int \fBget_font\fP ()" .br .RI "\fIget font param \fP" .ti -1c .RI "int \fBset_font\fP (const int font_in)" .br .RI "\fIset font param \fP" .ti -1c .RI "unsigned char \fBget_nikud\fP ()" .br .RI "\fIget nikud param \fP" .ti -1c .RI "unsigned char \fBset_nikud\fP (const unsigned char nikud_in)" .br .RI "\fIset nikud param \fP" .ti -1c .RI "unsigned char \fBset_dir_ltr\fP (const unsigned char dir_ltr_in)" .br .RI "\fIset dir_ltr param \fP" .ti -1c .RI "unsigned char \fBset_scale\fP (const unsigned char scale_in)" .br .RI "\fIset scale param \fP" .ti -1c .RI "unsigned char \fBset_auto_scale\fP ()" .br .RI "\fIset auto_scale param \fP" .ti -1c .RI "unsigned char \fBset_adaptive\fP (const unsigned char adaptive_in)" .br .RI "\fIset adaptive param \fP" .ti -1c .RI "unsigned char \fBset_threshold\fP (const unsigned char threshold_in)" .br .RI "\fIset threshold param \fP" .ti -1c .RI "unsigned char \fBset_a_threshold\fP (const unsigned char a_threshold_in)" .br .RI "\fIset a_threshold param \fP" .ti -1c .RI "int \fBget_font_spacing_code\fP ()" .br .RI "\fIget font_spacing_code param \fP" .ti -1c .RI "int \fBset_font_spacing_code\fP (const int font_spacing_code_in)" .br .RI "\fIset font_spacing_code param \fP" .ti -1c .RI "int \fBget_slicing_width\fP ()" .br .RI "\fIget slicing_width param \fP" .ti -1c .RI "int \fBset_slicing_width\fP (const int slicing_width_in)" .br .RI "\fIset slicing_width param \fP" .ti -1c .RI "int \fBget_slicing_threshold\fP ()" .br .RI "\fIget slicing_threshold param \fP" .ti -1c .RI "int \fBset_slicing_threshold\fP (const int slicing_threshold_in)" .br .RI "\fIset slicing_threshold param \fP" .ti -1c .RI "int \fBset_line_leeway\fP (const int line_leeway_in)" .br .RI "\fIset line_leeway param \fP" .ti -1c .RI "unsigned char \fBset_no_auto_rotate\fP (const unsigned char no_auto_rotate_in)" .br .RI "\fIset no_auto_rotate \fP" .ti -1c .RI "unsigned char \fBset_do_linguistics\fP (const unsigned char do_linguistics_in)" .br .RI "\fIset do_linguistics \fP" .ti -1c .RI "int \fBget_paragraph_setup\fP ()" .br .RI "\fIget paragraph setup param \fP" .ti -1c .RI "int \fBset_paragraph_setup\fP (const int paragraph_setup_in)" .br .RI "\fIset paragraph setup param \fP" .ti -1c .RI "const char * \fBget_build_string\fP ()" .br .RI "\fIget build string \fP" .in -1c .SS "Data Fields" .in +1c .ti -1c .RI "int \fBprogress\fP" .br .in -1c .SH "Detailed Description" .PP \fBHocr\fP class. class for Hebrew Optical Character Recognition .SH "Constructor & Destructor Documentation" .PP .SS "hocr::Hocr::Hocr (\fBho_pixbuf\fP * m_in = \fCNULL\fP)\fC [inline]\fP" .PP \fBHocr\fP constructor. .PP References progress. .SS "hocr::Hocr::~Hocr ()\fC [inline]\fP" .PP \fBHocr\fP destructor. .PP References ho_bitmap_free(), ho_layout_free(), ho_pixbuf_free(), and ho_string_free(). .SH "Member Function Documentation" .PP .SS "int hocr::Hocr::set_pixbuf (\fBho_pixbuf\fP * m_in)\fC [inline]\fP" .PP set pixbuf .PP \fBParameters:\fP .RS 4 \fIm_in\fP the pixbuf to use .RE .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References ho_bitmap_free(), ho_layout_free(), ho_pixbuf_free(), ho_string_free(), and progress. .SS "int hocr::Hocr::set_bitmap (\fBho_bitmap\fP * m_in)\fC [inline]\fP" .PP set b/w bitmap .PP \fBParameters:\fP .RS 4 \fIm_in\fP the b/w bitmap to use .RE .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References ho_bitmap_free(), ho_layout_free(), ho_pixbuf_free(), ho_string_free(), and progress. .SS "\fBho_pixbuf\fP* hocr::Hocr::get_pixbuf ()\fC [inline]\fP" .PP get pixbuf .PP \fBReturns:\fP .RS 4 the object pixbuf .RE .PP .SS "\fBho_bitmap\fP* hocr::Hocr::get_bitmap ()\fC [inline]\fP" .PP get bitmap .PP \fBReturns:\fP .RS 4 the object bitmap .RE .PP .SS "int hocr::Hocr::save_bitmap_as_pnm (const char * filename)\fC [inline]\fP" .PP save bitmap as pnm .PP \fBParameters:\fP .RS 4 \fIfilename\fP the the image file name .RE .PP \fBReturns:\fP .RS 4 the object bitmap .RE .PP .PP References ho_bitmap_pnm_save(). .SS "int hocr::Hocr::save_bitmap_as_tiff (const char * filename)\fC [inline]\fP" .PP save bitmap as tiff (neads a tiff enabled libhocr) .PP \fBParameters:\fP .RS 4 \fIfilename\fP the the image file name .RE .PP \fBReturns:\fP .RS 4 the object bitmap .RE .PP .PP References ho_bitmap_tiff_save(). .SS "\fBho_pixbuf\fP* hocr::Hocr::get_bitmap_pixbuf ()\fC [inline]\fP" .PP get bitmap pixbuf .PP \fBReturns:\fP .RS 4 a pixbuf of the object bitmap .RE .PP .PP References ho_pixbuf_free(), ho_pixbuf_new_from_bitmap(), and ho_pixbuf_to_rgb(). .SS "\fBho_pixbuf\fP* hocr::Hocr::get_layout_pixbuf ()\fC [inline]\fP" .PP get layout pixbuf .PP \fBReturns:\fP .RS 4 a pixbuf of the object layout .RE .PP .PP References ho_pixbuf_new_from_layout(). .SS "const char* hocr::Hocr::get_text ()\fC [inline]\fP" .PP get text .PP \fBReturns:\fP .RS 4 the recognized text .RE .PP .PP References ho_string::string. .SS "int hocr::Hocr::get_progress ()\fC [inline]\fP" .PP get progress of ocr .PP \fBReturns:\fP .RS 4 the progress 0..100 .RE .PP .PP References progress. .SS "int hocr::Hocr::do_image_processing ()\fC [inline]\fP" .PP do image processing .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References ho_bitmap_free(), hocr_image_processing(), and progress. .PP Referenced by do_ocr(). .SS "int hocr::Hocr::do_bitmap_closing ()\fC [inline]\fP" .PP do bitmap closing .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References ho_bitmap_closing(), and ho_bitmap_free(). .SS "int hocr::Hocr::do_bitmap_opening ()\fC [inline]\fP" .PP do bitmap opening .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References ho_bitmap_free(), and ho_bitmap_opening(). .SS "int hocr::Hocr::do_bitmap_erosion ()\fC [inline]\fP" .PP do bitmap erosion .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References ho_bitmap_erosion(), and ho_bitmap_free(). .SS "int hocr::Hocr::do_bitmap_dilation ()\fC [inline]\fP" .PP do bitmap dilation .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References ho_bitmap_dilation(), and ho_bitmap_free(). .SS "int hocr::Hocr::do_layout_analysis ()\fC [inline]\fP" .PP do layout analysis .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References ho_layout_free(), hocr_layout_analysis(), and progress. .PP Referenced by do_ocr(). .SS "int hocr::Hocr::do_font_recognition ()\fC [inline]\fP" .PP do font recognition .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References ho_string_free(), ho_string_new(), hocr_font_recognition(), and progress. .PP Referenced by do_ocr(). .SS "int hocr::Hocr::do_ocr ()\fC [inline]\fP" .PP do ocr .PP \fBReturns:\fP .RS 4 0 .RE .PP .PP References do_font_recognition(), do_image_processing(), and do_layout_analysis(). .SS "int hocr::Hocr::get_html ()\fC [inline]\fP" .PP get html param .PP \fBReturns:\fP .RS 4 FALSE-no html in output, TRUE-output html text .RE .PP .SS "int hocr::Hocr::set_html (const unsigned char html_in)\fC [inline]\fP" .PP set html param .PP \fBParameters:\fP .RS 4 \fIhtml_in\fP new value of html param .RE .PP \fBReturns:\fP .RS 4 FALSE-no html in output, TRUE-output html text .RE .PP .SS "int hocr::Hocr::get_font ()\fC [inline]\fP" .PP get font param .PP \fBReturns:\fP .RS 4 font code of objct .RE .PP .SS "int hocr::Hocr::set_font (const int font_in)\fC [inline]\fP" .PP set font param .PP \fBParameters:\fP .RS 4 \fIfont_in\fP new value of font param .RE .PP \fBReturns:\fP .RS 4 font code of objct .RE .PP .SS "unsigned char hocr::Hocr::get_nikud ()\fC [inline]\fP" .PP get nikud param .PP \fBReturns:\fP .RS 4 nikud of objct .RE .PP .SS "unsigned char hocr::Hocr::set_nikud (const unsigned char nikud_in)\fC [inline]\fP" .PP set nikud param .PP \fBParameters:\fP .RS 4 \fInikud_in\fP new value of nikud param .RE .PP \fBReturns:\fP .RS 4 nikud of objct .RE .PP .SS "unsigned char hocr::Hocr::set_dir_ltr (const unsigned char dir_ltr_in)\fC [inline]\fP" .PP set dir_ltr param .PP \fBParameters:\fP .RS 4 \fIdir_ltr_in\fP new value of dir_ltr param .RE .PP \fBReturns:\fP .RS 4 dir_ltr of objct .RE .PP .SS "unsigned char hocr::Hocr::set_scale (const unsigned char scale_in)\fC [inline]\fP" .PP set scale param .PP \fBParameters:\fP .RS 4 \fIscale_in\fP new value of scale param .RE .PP \fBReturns:\fP .RS 4 scale of objct .RE .PP .SS "unsigned char hocr::Hocr::set_auto_scale ()\fC [inline]\fP" .PP set auto_scale param .PP \fBReturns:\fP .RS 4 no_auto_scale of objct .RE .PP .SS "unsigned char hocr::Hocr::set_adaptive (const unsigned char adaptive_in)\fC [inline]\fP" .PP set adaptive param .PP \fBParameters:\fP .RS 4 \fIadaptive_in\fP new value of adaptive param .RE .PP \fBReturns:\fP .RS 4 adaptive of objct .RE .PP .SS "unsigned char hocr::Hocr::set_threshold (const unsigned char threshold_in)\fC [inline]\fP" .PP set threshold param .PP \fBParameters:\fP .RS 4 \fIthreshold_in\fP new value of threshold param .RE .PP \fBReturns:\fP .RS 4 threshold of objct .RE .PP .SS "unsigned char hocr::Hocr::set_a_threshold (const unsigned char a_threshold_in)\fC [inline]\fP" .PP set a_threshold param .PP \fBParameters:\fP .RS 4 \fIa_threshold_in\fP new value of a_threshold param .RE .PP \fBReturns:\fP .RS 4 a_threshold of objct .RE .PP .SS "int hocr::Hocr::get_font_spacing_code ()\fC [inline]\fP" .PP get font_spacing_code param .PP \fBReturns:\fP .RS 4 font_spacing_code of objct .RE .PP .SS "int hocr::Hocr::set_font_spacing_code (const int font_spacing_code_in)\fC [inline]\fP" .PP set font_spacing_code param .PP \fBParameters:\fP .RS 4 \fIfont_spacing_code_in\fP new value of font_spacing_code param .RE .PP \fBReturns:\fP .RS 4 font_spacing_code of objct .RE .PP .SS "int hocr::Hocr::get_slicing_width ()\fC [inline]\fP" .PP get slicing_width param .PP \fBReturns:\fP .RS 4 slicing_width of objct .RE .PP .SS "int hocr::Hocr::set_slicing_width (const int slicing_width_in)\fC [inline]\fP" .PP set slicing_width param .PP \fBParameters:\fP .RS 4 \fIslicing_width_in\fP new value of slicing_width param .RE .PP \fBReturns:\fP .RS 4 slicing_width of objct .RE .PP .SS "int hocr::Hocr::get_slicing_threshold ()\fC [inline]\fP" .PP get slicing_threshold param .PP \fBReturns:\fP .RS 4 slicing_threshold of objct .RE .PP .SS "int hocr::Hocr::set_slicing_threshold (const int slicing_threshold_in)\fC [inline]\fP" .PP set slicing_threshold param .PP \fBParameters:\fP .RS 4 \fIslicing_threshold_in\fP new value of slicing_threshold param .RE .PP \fBReturns:\fP .RS 4 slicing_threshold of objct .RE .PP .SS "int hocr::Hocr::set_line_leeway (const int line_leeway_in)\fC [inline]\fP" .PP set line_leeway param .PP \fBParameters:\fP .RS 4 \fIline_leeway_in\fP new value of line_leeway param .RE .PP \fBReturns:\fP .RS 4 line_leeway of objct .RE .PP .SS "unsigned char hocr::Hocr::set_no_auto_rotate (const unsigned char no_auto_rotate_in)\fC [inline]\fP" .PP set no_auto_rotate .PP \fBParameters:\fP .RS 4 \fIno_auto_rotate_in\fP new value of font_spacing_code param .RE .PP \fBReturns:\fP .RS 4 no_auto_rotate of objct .RE .PP .SS "unsigned char hocr::Hocr::set_do_linguistics (const unsigned char do_linguistics_in)\fC [inline]\fP" .PP set do_linguistics .PP \fBParameters:\fP .RS 4 \fIdo_linguistics_in\fP new value of do_linguistics param .RE .PP \fBReturns:\fP .RS 4 do_linguistics of objct .RE .PP .SS "int hocr::Hocr::get_paragraph_setup ()\fC [inline]\fP" .PP get paragraph setup param .PP \fBReturns:\fP .RS 4 paragraph setup .RE .PP .SS "int hocr::Hocr::set_paragraph_setup (const int paragraph_setup_in)\fC [inline]\fP" .PP set paragraph setup param .PP \fBParameters:\fP .RS 4 \fIparagraph_setup_in\fP new value of font param .RE .PP \fBReturns:\fP .RS 4 paragraph setup of objct .RE .PP .SS "const char* hocr::Hocr::get_build_string ()\fC [inline]\fP" .PP get build string .PP \fBReturns:\fP .RS 4 build string .RE .PP .PP References hocr_get_build_string(). .SH "Field Documentation" .PP .SS "int \fBhocr::Hocr::progress\fP" .PP Referenced by do_font_recognition(), do_image_processing(), do_layout_analysis(), get_progress(), Hocr(), set_bitmap(), and set_pixbuf(). .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_obj.30000644000175000017500000000156211044261550014112 00000000000000.TH "ho_obj" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME ho_obj \- libhocr object struct .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP .SS "Data Fields" .in +1c .ti -1c .RI "int \fBindex\fP" .br .ti -1c .RI "int \fBreading_index\fP" .br .ti -1c .RI "double \fBweight\fP" .br .ti -1c .RI "int \fBx\fP" .br .ti -1c .RI "int \fBy\fP" .br .ti -1c .RI "int \fBwidth\fP" .br .ti -1c .RI "int \fBheight\fP" .br .in -1c .SH "Detailed Description" .PP libhocr object struct .SH "Field Documentation" .PP .SS "int \fBho_obj::index\fP" .PP .SS "int \fBho_obj::reading_index\fP" .PP .SS "double \fBho_obj::weight\fP" .PP .SS "int \fBho_obj::x\fP" .PP .SS "int \fBho_obj::y\fP" .PP .SS "int \fBho_obj::width\fP" .PP .SS "int \fBho_obj::height\fP" .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_dimentions.h.30000644000175000017500000000726311044261550015743 00000000000000.TH "src/ho_dimentions.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/ho_dimentions.h \- libhocr C language header. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br .SS "Defines" .in +1c .ti -1c .RI "#define \fBHO_DIMENTIONS_H\fP 1" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "int \fBho_dimentions_font_width_height_nikud\fP (\fBho_bitmap\fP *m, const int min_height, const int max_height, const int min_width, const int max_width)" .br .ti -1c .RI "int \fBho_dimentions_line_spacing\fP (\fBho_bitmap\fP *m)" .br .ti -1c .RI "int \fBho_dimentions_font_spacing\fP (\fBho_bitmap\fP *m, const \fBho_bitmap\fP *m_line_map)" .br .ti -1c .RI "int \fBho_dimentions_line_fill\fP (\fBho_bitmap\fP *m, const \fBho_bitmap\fP *m_line_map)" .br .ti -1c .RI "int \fBho_dimentions_get_columns\fP (const \fBho_bitmap\fP *m)" .br .ti -1c .RI "int \fBho_dimentions_get_columns_with_x_start\fP (const \fBho_bitmap\fP *m, int **column_start_list)" .br .ti -1c .RI "double \fBho_dimentions_get_lines_angle\fP (const \fBho_bitmap\fP *m)" .br .in -1c .SH "Detailed Description" .PP libhocr C language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Define Documentation" .PP .SS "#define HO_DIMENTIONS_H 1" .PP .SH "Function Documentation" .PP .SS "int ho_dimentions_font_width_height_nikud (\fBho_bitmap\fP * m, const int min_height, const int max_height, const int min_width, const int max_width)" .PP guess font dimentions, sets: font_height, font_width and nikud [for a page or block] .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fImin_height\fP only objects with this minimal height are used .br \fImax_height\fP only objects with this maximal height are used .br \fImin_width\fP only objects with this minimal width are used .br \fImax_width\fP only objects with this maximal width are used .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_dimentions_line_spacing (\fBho_bitmap\fP * m)" .PP guess line dimentions, sets line_spacing [for a block] .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_dimentions_font_spacing (\fBho_bitmap\fP * m, const \fBho_bitmap\fP * m_line_map)" .PP guess line dimentions, sets font_spacing [for a line] .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP of text .br \fIm_line_map\fP pointer to an \fBho_bitmap\fP of ine .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_dimentions_line_fill (\fBho_bitmap\fP * m, const \fBho_bitmap\fP * m_line_map)" .PP get line fill parameters [for a line] .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP of text .br \fIm_line_map\fP pointer to an \fBho_bitmap\fP of ine .RE .PP \fBReturns:\fP .RS 4 FALSE .RE .PP .SS "int ho_dimentions_get_columns (const \fBho_bitmap\fP * m)" .PP guess number of columns in bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .RE .PP \fBReturns:\fP .RS 4 guessed number of columns .RE .PP .SS "int ho_dimentions_get_columns_with_x_start (const \fBho_bitmap\fP * m, int ** column_start_list)" .PP guess number of columns in bitmap .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .br \fIcolumn_start_list\fP a newly allocated int list of start of columns x value .RE .PP \fBReturns:\fP .RS 4 guessed number of columns .RE .PP .SS "double ho_dimentions_get_lines_angle (const \fBho_bitmap\fP * m)" .PP guess angle of page lines .PP \fBParameters:\fP .RS 4 \fIm\fP pointer to an \fBho_bitmap\fP .RE .PP \fBReturns:\fP .RS 4 guessed angle in degrees .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/hocrpp.h.30000644000175000017500000000112711044261550014370 00000000000000.TH "src/hocrpp.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME src/hocrpp.h \- libhocr main C++ language header. .SH SYNOPSIS .br .PP \fC#include \fP .br .SS "Namespaces" .in +1c .ti -1c .RI "namespace \fBhocr\fP" .br .in -1c .SS "Data Structures" .in +1c .ti -1c .RI "class \fBhocr::Hocr\fP" .br .RI "\fI\fBHocr\fP class. \fP" .in -1c .SH "Detailed Description" .PP libhocr main C++ language header. libhocr - LIBrary for Hebrew Optical Character Recognition .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/man3/ho_array.30000644000175000017500000000115011044261550014447 00000000000000.TH "ho_array" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*- .ad l .nh .SH NAME ho_array \- libhocr array struct .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP .SS "Data Fields" .in +1c .ti -1c .RI "int \fBheight\fP" .br .ti -1c .RI "int \fBwidth\fP" .br .ti -1c .RI "double * \fBdata\fP" .br .in -1c .SH "Detailed Description" .PP libhocr array struct .SH "Field Documentation" .PP .SS "int \fBho_array::height\fP" .PP .SS "int \fBho_array::width\fP" .PP .SS "double* \fBho_array::data\fP" .PP .SH "Author" .PP Generated automatically by Doxygen for libhocr from the source code. libhocr-0.10.17/docs/man/Makefile.in0000644000175000017500000003521311043604650013776 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man1 man3 all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/man/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/docs/man/man1/0000777000175000017500000000000011051630066012644 500000000000000libhocr-0.10.17/docs/man/man1/Makefile.am0000644000175000017500000000005011017002614014601 00000000000000EXTRA_DIST = hocr.1 man_MANS = hocr.1 libhocr-0.10.17/docs/man/man1/Makefile.in0000644000175000017500000002562211043604650014635 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/man/man1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = hocr.1 man_MANS = hocr.1 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/man/man1/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/man/man1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-man1 install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-man uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/docs/man/man1/hocr.10000644000175000017500000000755611017002614013604 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. .TH HOCR "1" "February 2008" "hocr - Hebrew OCR utility" "User Commands" .SH NAME hocr \- manual page for hocr - Hebrew OCR utility .SH DESCRIPTION .SS "Usage:" .IP hocr [OPTION...] \- Hebrew OCR utility .SS "Help Options:" .TP \-?, \fB\-\-help\fR Show help options .TP \fB\-\-help\-all\fR Show all help options .TP \fB\-\-help\-file\fR Show file options .TP \fB\-\-help\-image\-proccesing\fR Show image proccesing options .TP \fB\-\-help\-segmentation\fR Show segmentation options .TP \fB\-\-help\-debug\fR Show debug options .PP File options .TP \fB\-O\fR, \fB\-\-images\-out\-path\fR=\fIPATH\fR use PATH for output images .TP \fB\-u\fR, \fB\-\-data\-out\fR=\fIFILE\fR use FILE as output data file name .TP \fB\-C\fR, \fB\-\-save\-copy\fR save a compy of original image .TP \fB\-b\fR, \fB\-\-save\-bw\fR save proccesd bw image .TP \fB\-B\fR, \fB\-\-save\-bw\-exit\fR save proccesd bw image and exit .TP \fB\-l\fR, \fB\-\-save\-layout\fR save layout image .TP \fB\-L\fR, \fB\-\-save\-layout\-exit\fR save layout image and exit .TP \fB\-f\fR, \fB\-\-save\-fonts\fR save fonts .TP \fB\-F\fR, \fB\-\-save\-fonts\-exit\fR save fonts images and exit .PP Image proccesing options .TP \fB\-T\fR, \fB\-\-thresholding\-type\fR=\fINUM\fR thresholding type, 0 normal, 1 none, 2 fine .TP \fB\-t\fR, \fB\-\-threshold\fR=\fINUM\fR use NUM as threshold value, 1..100 .TP \fB\-a\fR, \fB\-\-adaptive\-threshold\fR=\fINUM\fR use NUM as adaptive threshold value, 1..100 .TP \fB\-s\fR, \fB\-\-scale\fR=\fISCALE\fR scale input image by SCALE 1..9, 0 auto .TP \fB\-S\fR, \fB\-\-no\-auto\-scale\fR do not auto acale image .TP \fB\-q\fR, \fB\-\-rotate\fR=\fIDEG\fR rotate image clockwise in deg. .TP \fB\-Q\fR, \fB\-\-no\-auto\-rotate\fR do not auto rotate image .PP Segmentation options .TP \fB\-c\fR, \fB\-\-colums\fR setup=NUM colums setup: 1.. #colums, 0 auto, 255 free .TP \fB\-x\fR, \fB\-\-slicing\fR=\fINUM\fR use NUM as font slicing threshold, 1..250 .TP \fB\-X\fR, \fB\-\-slicing\-width\fR=\fINUM\fR use NUM as font slicing width, 50..250 .TP \fB\-w\fR, \fB\-\-font\-spacing\fR=\fINUM\fR font spacing: tight ..\-1, 0, 1.. spaced .PP Debug options .TP \fB\-g\fR, \fB\-\-draw\-grid\fR draw grid on output images .TP \fB\-d\fR, \fB\-\-debug\fR print debuging information while running .TP \fB\-D\fR, \fB\-\-debug\-extra\fR print extra debuging information .TP \fB\-y\fR, \fB\-\-font\-filter\fR=\fINUM\fR debug a font filter, use filter NUM .TP \fB\-Y\fR, \fB\-\-font\-filter\-list\fR print a list of debug a font filters .TP \fB\-j\fR, \fB\-\-font\-num\-out\fR print font numbers in output text .SS "Application Options:" .TP \fB\-i\fR, \fB\-\-image\-in\fR=\fIFILE\fR use FILE as input image file name .TP \fB\-o\fR, \fB\-\-text\-out\fR=\fIFILE\fR use FILE as output text file name .TP \fB\-h\fR, \fB\-\-html\-out\fR output text in html format .TP \fB\-N\fR, \fB\-\-no\-gtk\fR do not use gtk for file input and output .TP \fB\-z\fR, \fB\-\-font\fR=\fINUM\fR use font NUM .TP \fB\-n\fR, \fB\-\-no\-nikud\fR do not recognize nikud .TP \fB\-v\fR, \fB\-\-version\fR print version information and exit .PP libhocr\-0.10.5\-i686\-pc\-linux\-gnu\-12022008 http://hocr.berlios.de Copyright (C) 2005\-2008 Yaacov Zamir .PP This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program. If not, see . .TP .SH "SEE ALSO" gocr(1), ocrad(1), unpaper(1) libhocr-0.10.17/docs/Makefile.am0000644000175000017500000000001711017002615013176 00000000000000SUBDIRS = man libhocr-0.10.17/docs/Makefile.in0000644000175000017500000003517111043604650013226 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_STR = @BUILD_STR@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ PY_MODULES_PATH = @PY_MODULES_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw_CFLAGS = @fftw_CFLAGS@ fftw_LIBS = @fftw_LIBS@ glib_CFLAGS = @glib_CFLAGS@ glib_LIBS = @glib_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ have_swig = @have_swig@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ hspell_CFLAGS = @hspell_CFLAGS@ hspell_LIBS = @hspell_LIBS@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ld_hspell = @ld_hspell@ ld_tiff = @ld_tiff@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ requires_gtk = @requires_gtk@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ tiff_CFLAGS = @tiff_CFLAGS@ tiff_LIBS = @tiff_LIBS@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libhocr-0.10.17/config/0000777000175000017500000000000011051630065011551 500000000000000libhocr-0.10.17/config/py-compile0000755000175000017500000001005611041070315013466 00000000000000#!/bin/sh # py-compile - Compile a Python program scriptversion=2005-05-14.22 # Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . if [ -z "$PYTHON" ]; then PYTHON=python fi basedir= destdir= files= while test $# -ne 0; do case "$1" in --basedir) basedir=$2 if test -z "$basedir"; then echo "$0: Missing argument to --basedir." 1>&2 exit 1 fi shift ;; --destdir) destdir=$2 if test -z "$destdir"; then echo "$0: Missing argument to --destdir." 1>&2 exit 1 fi shift ;; -h|--h*) cat <<\EOF Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." Byte compile some python scripts FILES. Use --destdir to specify any leading directory path to the FILES that you don't want to include in the byte compiled file. Specify --basedir for any additional path information you do want to be shown in the byte compiled file. Example: py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py Report bugs to . EOF exit $? ;; -v|--v*) echo "py-compile $scriptversion" exit $? ;; *) files="$files $1" ;; esac shift done if test -z "$files"; then echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 fi # if basedir was given, then it should be prepended to filenames before # byte compilation. if [ -z "$basedir" ]; then pathtrans="path = file" else pathtrans="path = os.path.join('$basedir', file)" fi # if destdir was given, then it needs to be prepended to the filename to # byte compile but not go into the compiled file. if [ -z "$destdir" ]; then filetrans="filepath = path" else filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" fi $PYTHON -c " import sys, os, string, py_compile files = '''$files''' print 'Byte-compiling python modules...' for file in string.split(files): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue print file, sys.stdout.flush() py_compile.compile(filepath, filepath + 'c', path) print" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " import sys, os, string, py_compile files = '''$files''' print 'Byte-compiling python modules (optimized versions) ...' for file in string.split(files): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue print file, sys.stdout.flush() py_compile.compile(filepath, filepath + 'o', path) print" 2>/dev/null || : # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: libhocr-0.10.17/config/config.sub0000755000175000017500000010115310756112266013462 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libhocr-0.10.17/config/depcomp0000755000175000017500000004271311017002730013043 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2007-03-29.01 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: libhocr-0.10.17/config/install-sh0000755000175000017500000003246411017002727013502 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: libhocr-0.10.17/config/ltmain.sh0000644000175000017500000060646011005712103013312 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION="1.5.26 Debian 1.5.26-4" TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "\ $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; *.sx) xform=sx ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$deplibdir/$depdepl" ; then depdepl="$deplibdir/$depdepl" elif test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" else # Can't find it, oh well... depdepl= fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then major=`expr $current - $age` else major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then case $archive_cmds in *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: libhocr-0.10.17/config/config.guess0000755000175000017500000012753410756112266014032 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libhocr-0.10.17/config/missing0000755000175000017500000002557711017002727013104 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: libhocr-0.10.17/Doxyfile0000644000175000017500000014521711051627450011744 00000000000000# Doxyfile 1.5.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = libhocr # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 0.10.17 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = docs # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # This tag can be used to specify the encoding used in the generated output. # The encoding is not always determined by the language that is chosen, # but also whether or not the output is meant for Windows or non-Windows users. # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES # forces the Windows encoding (this is the default for the Windows binary), # whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = NO # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = src/ # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = *.h # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = ./ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a caller dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that a graph may be further truncated if the graph's # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = YES libhocr-0.10.17/NEWS0000644000175000017500000000000011017002616010702 00000000000000libhocr-0.10.17/COPYING0000644000175000017500000010451311017002616011254 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read .