mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
implement '--enable-debug' for ./configure; small clean up autogen.sh and configure.ac
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@732 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
1131e5dd2f
commit
8708102883
16
autogen.sh
16
autogen.sh
@ -6,7 +6,7 @@
|
||||
# aclocal
|
||||
# autoheader
|
||||
# autoconf
|
||||
# autromake
|
||||
# automake
|
||||
#
|
||||
# The whole thing is quite complex...
|
||||
#
|
||||
@ -29,15 +29,15 @@
|
||||
|
||||
# create m4 directory if it not exists
|
||||
if [ ! -d m4 ]; then
|
||||
mkdir m4
|
||||
mkdir m4
|
||||
fi
|
||||
|
||||
bail_out()
|
||||
{
|
||||
echo
|
||||
echo " Something went wrong, bailing out!"
|
||||
echo
|
||||
exit 1
|
||||
echo
|
||||
echo " Something went wrong, bailing out!"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# --- Step 1: Generate aclocal.m4 from:
|
||||
@ -49,7 +49,7 @@ mkdir -p config
|
||||
echo "Running aclocal"
|
||||
aclocal -I config || bail_out
|
||||
|
||||
# --- Step 2:
|
||||
# --- Step 2:
|
||||
|
||||
echo "Running libtoolize"
|
||||
libtoolize -f -c || glibtoolize -f -c || bail_out
|
||||
@ -85,5 +85,5 @@ echo ""
|
||||
echo "All done."
|
||||
echo "To build the software now, do something like:"
|
||||
echo ""
|
||||
echo "$ ./configure [--with-debug] [...other options]"
|
||||
echo "$ ./configure [--enable-debug] [...other options]"
|
||||
echo "$ make"
|
||||
|
29
configure.ac
29
configure.ac
@ -65,14 +65,11 @@ case $host_os in
|
||||
mingw32*)
|
||||
AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
|
||||
AM_CONDITIONAL(MINGW, true)
|
||||
#AC_SUBST([AM_CPPFLAGS], ["-DWINDLLNAME=\"lib$GENERIC_LIBRARY_NAME\""])
|
||||
#AC_SUBST([AM_CPPFLAGS], ["-D__BLOB_T_DEFINED -DWINDLLNAME=\"lib$GENERIC_LIBRARY_NAME\""])
|
||||
AC_SUBST([AM_CPPFLAGS], ["-D__BLOB_T_DEFINED"])
|
||||
AC_SUBST([AM_LDFLAGS], ['-Wl,-no-undefined -Wl,--as-needed'])
|
||||
#AM_LDFLAGS='-Wl,-no-undefined -Wl,--as-needed'
|
||||
;;
|
||||
*)
|
||||
# default
|
||||
# default
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -143,12 +140,30 @@ AM_CONDITIONAL([USING_MULTIPLELIBS], [test "$enable_mlibs" = "yes"])
|
||||
# Check if tessdata-prefix is disabled
|
||||
AC_MSG_CHECKING(whether to use tessdata-prefix)
|
||||
AC_ARG_ENABLE(tessdata-prefix,
|
||||
[AC_HELP_STRING([--disable-tessdata-prefix],
|
||||
[dont set TESSDATA-PREFIX during compile])],
|
||||
[tessdata_prefix="no"], [tessdata_prefix="yes"])
|
||||
[AC_HELP_STRING([--disable-tessdata-prefix],
|
||||
[dont set TESSDATA-PREFIX during compile])],
|
||||
[tessdata_prefix="no"], [tessdata_prefix="yes"])
|
||||
AC_MSG_RESULT($tessdata_prefix)
|
||||
AM_CONDITIONAL([NO_TESSDATA_PREFIX], [test "$tessdata_prefix" = "no"])
|
||||
|
||||
# Check whether enable debuging
|
||||
AC_MSG_CHECKING(whether to enable debugging)
|
||||
AC_ARG_ENABLE([debug],
|
||||
[AC_HELP_STRING([--enable-debug],
|
||||
[turn on debugging (default=no)])],
|
||||
[debug=$enableval],
|
||||
[debug="no"])
|
||||
AC_MSG_RESULT($debug)
|
||||
if test x"$debug" = x"yes"; then
|
||||
AC_DEFINE([DEBUG],[],[Debug Mode])
|
||||
AM_CXXFLAGS="$AM_CXXFLAGS -g -Wall -Wno-uninitialized -O0"
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wno-uninitialized -O0"
|
||||
else
|
||||
AC_DEFINE([NDEBUG],[],[No-debug Mode])
|
||||
AM_CXXFLAGS="$AM_CXXFLAGS -O3"
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS -O3"
|
||||
fi
|
||||
|
||||
#localedir='${prefix}/share/locale'
|
||||
|
||||
# Not used yet, so disable
|
||||
|
Loading…
Reference in New Issue
Block a user