diff --git a/configure.ac b/configure.ac index a64e167f67f1b5a4d11c749b2d407f551ad458ed..72d7a85f3f7d1639f13d6e1f9b06c44bfad6d06e 100644 --- a/configure.ac +++ b/configure.ac @@ -56,6 +56,8 @@ AC_SUBST(GENERIC_VERSION) AM_CONDITIONAL(MINGW, false) AM_CONDITIONAL(GRAPHICS_DISABLED, false) + +############################# # # Platform specific setup # @@ -75,24 +77,6 @@ esac includedir="${includedir}/tesseract" -AC_ARG_WITH(extra-includes, - AC_HELP_STRING([--with-extra-includes=DIR], - [Define an additional directory for include files]), - [ if test -d "$withval" ; then - CFLAGS="$CFLAGS -I$withval" - else - AC_MSG_ERROR([Cannot stat directory $withval]) - fi ] ) - -AC_ARG_WITH(extra-libraries, - AC_HELP_STRING([--with-extra-libraries=DIR], - [Define an additional directory for library files]), - [ if test -d "$withval" ; then - LDFLAGS="$LDFLAGS -L$withval" - else - AC_MSG_ERROR([Cannot stat directory $withval]) - fi ] ) - AC_MSG_CHECKING(--enable-graphics argument) AC_ARG_ENABLE([graphics], [AC_HELP_STRING([--enable-graphics],[enable graphics (ScrollView) (default)]) @@ -208,27 +192,19 @@ esac # ---------------------------------------- # Define order of compilers -AC_PROG_CXX(cl.exe g++) -# Not needed -# AC_PROG_CC +AC_PROG_CXX(g++) AC_PROG_LIBTOOL +# ---------------------------------------- # Automake configuration # ---------------------------------------- -# Note: may need to configure automake to use ZIP as a distribution -# format because of an apparent bug with GZIP, which results in bogus -# archives. -# TODO(luc) Resolve this issue. -#AM_INIT_AUTOMAKE(dist-zip) AM_INIT_AUTOMAKE -AM_CONFIG_HEADER(config_auto.h:config/config.h.in) -#AM_PROG_CC_C_O +AC_CONFIG_HEADERS(config_auto.h:config/config.h.in) AM_MAINTAINER_MODE -# Need to tell automake if Visual C++ is being used: -AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' ) +# ---------------------------------------- # Additional checking of compiler characteristics # ---------------------------------------- @@ -245,80 +221,7 @@ AC_C_BIGENDIAN # Check where all the following programs are and set # variables accordingly: LT_INIT -# AC_PROG_LN_S -# AC_PATH_PROG(MV, mv) -# AC_PATH_PROG(CP, cp) -# AC_PATH_PROG(RM, rm) -# AC_PATH_PROG(AR, ar) -# AC_PATH_PROG(TOUCH, touch) -# AC_PATH_PROG(SED, sed) -# AC_PATH_PROG(BASH, bash, ,[$PATH:/usr/bin:/util/tools/bin]) -# # To use substitution in makefiles, use something like: -# AC_SUBST(BASH) - -# TODO(luc) Handle documentation. None of the following -# is really needed until then -# -# AC_PROG_DOXYGEN_VERSION(1.3.2,[DOXYGEN_OK=1]) -# AC_PATH_PROG(DOT, dot) -# AC_PATH_PROG(LATEX, latex) -# AC_PATH_PROG(DVIPS, dvips) -# AC_PATH_PROG(MAKEINDEX, makeindex) -# AC_PATH_PROG(PDFLATEX, pdflatex) -# AC_PATH_PROG(GZIP, gzip) -# -# if test -z "$DOXYGEN_OK" -o -z "$DOT"; then -# AC_MSG_WARN([------------------------------------ -# *** Disabling automatic documentation generation for this -# *** package. Please check that you have 'doxygen' (version -# *** $ac_doxygen_version or later) and 'graphviz' (aka, 'dot') -# *** installed on your system. In addition, to generate -# *** PostScript and PDF documentation, you will need to have -# *** LaTeX and PdfLaTeX respectively. Re-run this configuration -# *** script after you have updated your environment. -# --------------------------------------------------------]) -# -# # We have appropriate version of doxygen and dot, so we -# # can generate documentation. It remains to be seen whether -# # we can generate PDF and PostScript documentation.. -# else -# GENERATE_DOCUMENTATION="true" -# -# # Determine if PostScript documentation is generated: -# if test -z "$LATEX" -o -z "$DVIPS" -o -z "$MAKEINDEX"; then -# AC_MSG_WARN([Disabling generation of PostScript documentation]) -# else -# GENERATE_PS_DOCUMENTATION="true" -# fi -# -# # Determine if PDF documentation is generated: -# if test -z "$PDFLATEX" -o -z "$MAKEINDEX"; then -# AC_MSG_WARN([Disabling generation of PDF documentation]) -# else -# GENERATE_PDF_DOCUMENTATION="true" -# fi -# fi -# -# # These substitutions could be inside the 'else' -# # conditionals above, but it is not necessary and would -# # only cause some confusion... -# AC_SUBST(DOXYGEN) -# AC_SUBST(DOT) -# AC_SUBST(LATEX) -# AC_SUBST(DVIPS) -# AC_SUBST(MAKEINDEX) -# AC_SUBST(PDFLATEX) -# AC_SUBST(GZIP) -# -# # Adjust makefiles based on the kind of documentation that -# # is being generated, -# AM_CONDITIONAL(GENERATE_DOCUMENTATION, test -n "$GENERATE_DOCUMENTATION") -# AM_CONDITIONAL(GENERATE_PS_DOCUMENTATION, test -n "$GENERATE_PS_DOCUMENTATION") -# AM_CONDITIONAL(GENERATE_PDF_DOCUMENTATION, test -n "$GENERATE_PDF_DOCUMENTATION") - -# Test for GNUWIN32 tools (only useful under windows) -# AC_PATH_GNUWIN32 # ---------------------------------------- # C++ related options @@ -326,26 +229,13 @@ LT_INIT AC_LANG_CPLUSPLUS -# Enable --enable-debug or --disable-debug and set -# compile options accordingly. We are supposed to be either -# in debug mode or in optimize mode. Note that in debug mode, -# DEBUG_MODE will be set by this macro -# AC_CXX_OPTIMIZE -# AC_CXX_BOOL -# AC_CXX_TYPENAME -# AC_CXX_STDINCLUDES -# AC_CXX_RPO # ---------------------------------------- # Check for libraries # ---------------------------------------- -# This option seems to always add -lm to the link line, -# which causes unnecessary warnings with Visual C++. -# Comment it out for now. -#AC_CHECK_LIB(m,sqrt) AC_SEARCH_LIBS(sem_init,pthread rt) -#AC_CHECK_LIB(pthread,sem_init) + # ---------------------------------------- # Checks for header files. @@ -356,7 +246,6 @@ AC_HEADER_TIME AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(sys/ipc.h sys/shm.h) AC_CHECK_HEADERS(limits.h malloc.h) -AC_CHECK_HEADERS(allheaders.h) # Enable use of system-defined bool type if available: AC_HEADER_STDBOOL @@ -370,26 +259,8 @@ AC_SYS_LARGEFILE # ---------------------------------------- AC_CHECK_TYPES(wchar_t) -AC_CHECK_TYPES(long long int) AC_CHECK_TYPES(mbstate_t,,,[#include "wchar.h"]) -#AC_TYPE_MODE_T -#AC_TYPE_OFF_T -AC_TYPE_SIZE_T -#AC_TYPE_PID_T - - -# ---------------------------------------- -# Checks for library functions. -# ---------------------------------------- - -AC_FUNC_MMAP -AC_FUNC_FORK -AC_CHECK_FUNCS(strerror vsnprintf) -AC_CHECK_FUNCS(gethostname) -AC_CHECK_FUNCS(strchr memcpy) -AC_CHECK_FUNCS(acos asin) - # ---------------------------------------- # Test auxilliary packages # ---------------------------------------- @@ -423,11 +294,6 @@ fi # Final Tasks and Output # ---------------------------------------- -# Define installation paths -# AC_DEFINE_INSTALL_PATHS -# Redundant with PACKAGE_VERSION - comment out -# AC_DEFINE_UNQUOTED(TESSERACT_VERSION,["${PACKAGE_VERSION}"],[version string]) - # Output files AC_CONFIG_FILES([Makefile tesseract.pc]) #if test "$enable_gettext" = "yes"; then @@ -470,8 +336,6 @@ AC_OUTPUT echo "" echo "Configuration is done." echo "You can now build $PACKAGE_NAME by running:" -# test x$GXX = xyes && \ -# echo "% make depend [optional]" echo "" echo "% make"