mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
removed complicated stuff in config
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@20 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
3eb3ff3be3
commit
cf5d4ab675
166
acinclude.m4
166
acinclude.m4
@ -1,10 +1,156 @@
|
||||
# Master include for AC macros. This directory structure allows
|
||||
# for more flexibility with respect to CVS modules.
|
||||
#
|
||||
# Author: Luc Vincent
|
||||
|
||||
### m4_include(config/ac_compile_check_sizeof.m4)dnl
|
||||
#m4_include(config/ac_create_stdint_h.m4)dnl
|
||||
#m4_include(config/ax_create_stdint_h.m4)dnl
|
||||
m4_include(config/ac_define_versionlevel.m4)dnl
|
||||
m4_include(config/acinclude_custom.m4)dnl
|
||||
dnl ------------------------------------------------------------------
|
||||
dnl @synopsis AC_PATH_LIBTIFF([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
dnl Process option --with-libtiff.
|
||||
dnl Search LIBTIFF along the extra
|
||||
dnl Define HAVE_LIBTIFF.
|
||||
dnl Set output variable LIBTIFF_CFLAGS and LIBTIFF_LIBS
|
||||
dnl -- inspired from previous AC_PATH_JPEG
|
||||
dnl ------------------------------------------------------------------
|
||||
AC_DEFUN([AC_PATH_LIBTIFF],
|
||||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
case $host in
|
||||
*msdos* | *go32* | *mingw32* | *cygwin* | *windows*)
|
||||
USING_WIN=yes
|
||||
;;
|
||||
*)
|
||||
USING_WIN=no
|
||||
esac
|
||||
AC_ARG_VAR(LIBTIFF_LIBS,[Tiff library to link against])
|
||||
AC_ARG_VAR(LIBTIFF_CFLAGS,[Compile flags needed for TIFF support])
|
||||
ac_libtiff=no
|
||||
AC_ARG_WITH(libtiff,
|
||||
AC_HELP_STRING([--with-libtiff=DIR],
|
||||
[where the www.libtiff.org libtiff library is located]),
|
||||
[ac_libtiff=$withval], [ac_libtiff=yes] )
|
||||
AC_MSG_CHECKING([for Leffler libtiff library])
|
||||
# Need to define TOP_SRCDIR for the cases where the LIBTIFF library
|
||||
# is checked in with the code, at the top-level
|
||||
TOP_SRCDIR=`cd $srcdir; pwd`
|
||||
LOCAL_LIBTIFFDIR=$TOP_SRCDIR/libtiff
|
||||
# First of all, deal with the case when 'cl.exe' is used as compiler
|
||||
# indeed, when this is the case, we can only rely on finding
|
||||
# the right library and includes, but we can't try compiling
|
||||
# and linking. In addition, library needs to be specifically
|
||||
# supplied on the link line and special flags are needed...
|
||||
if test "x$CXX" = "xcl.exe" ; then
|
||||
if test "x$ac_libtiff" = "xyes" ; then
|
||||
# If LIBTIFF_LIBS has been set on configure command line
|
||||
# or as environment variable, just use it if it exists
|
||||
if test "x$LIBTIFF_LIBS" != "x" ; then
|
||||
AC_MSG_RESULT(user specified as $LIBTIFF_LIBS)
|
||||
if test "x$LIBTIFF_CFLAGS" = "x" ; then
|
||||
AC_MSG_WARN(LIBTIFF_CFLAGS is empty)
|
||||
fi
|
||||
fi
|
||||
# Otherwise, test if libtiff is at top level directory, under libtiff
|
||||
if test "x$LIBTIFF_LIBS" = "x" && test -r "$LOCAL_LIBTIFFDIR/lib/libtiff.a" && test -r "$LOCAL_LIBTIFFDIR/lib/libjpeg.a" && test -r "$LOCAL_LIBTIFFDIR/lib/libz.a" ; then
|
||||
AC_MSG_RESULT($LOCAL_LIBTIFFDIR/lib/libtiff.a)
|
||||
LIBTIFF_LIBS="$LOCAL_LIBTIFFDIR/lib/libtiff.a $LOCAL_LIBTIFFDIR/lib/libjpeg.a $LOCAL_LIBTIFFDIR/lib/libz.a user32.lib"
|
||||
LIBTIFF_CFLAGS="-I$LOCAL_LIBTIFFDIR/include"
|
||||
fi
|
||||
# Otherwise, if GnuWin32 was previously located
|
||||
if test "x$LIBTIFF_LIBS" = "x" && test -r "$GNUWIN32_BASE/lib/libtiff.a" && test -r "$GNUWIN32_BASE/lib/libjpeg.a" && test -r "$GNUWIN32_BASE/lib/libz.a" ; then
|
||||
AC_MSG_RESULT($GNUWIN32_BASE/lib/libtiff.a)
|
||||
AC_MSG_WARN($GNUWIN32_BASE/lib/libtiff.a version 3.5.7 works. Some versions like 3.6.1 do not!)
|
||||
LIBTIFF_LIBS="$GNUWIN32_BASE/lib/libtiff.a $GNUWIN32_BASE/lib/libjpeg.a $GNUWIN32_BASE/lib/libz.a user32.lib"
|
||||
fi
|
||||
if test "x$LIBTIFF_LIBS" = "x" ; then
|
||||
AC_MSG_RESULT(not found or incomplete)
|
||||
ac_libtiff=no
|
||||
fi
|
||||
elif test "x$ac_libtiff" != "xno" ; then
|
||||
test x${LIBTIFF_LIBS+set} != xset && LIBTIFF_LIBS="$ac_libtiff/libtiff"
|
||||
test x${LIBTIFF_CFLAGS+set} != xset && LIBTIFF_CFLAGS="-I$ac_libtiff"
|
||||
fi
|
||||
# If we are not using CL, that is we are either using gcc/cygwin
|
||||
# or we are not running under Windows:
|
||||
else
|
||||
# Process specification
|
||||
if test "x$ac_libtiff" = "xyes" ; then
|
||||
if test "x$LIBTIFF_LIBS" = "x" ; then
|
||||
# If local libtiff exists at top level, and we are running windows, use it first:
|
||||
if test "x$USING_WIN" = "xyes" && test -r "$LOCAL_LIBTIFFDIR/lib/libtiff.a" && test -r "$LOCAL_LIBTIFFDIR/lib/libjpeg.a" && test -r "$LOCAL_LIBTIFFDIR/lib/libz.a" ; then
|
||||
AC_MSG_RESULT($LOCAL_LIBTIFFDIR/lib/libtiff.a)
|
||||
LIBTIFF_LIBS="$LOCAL_LIBTIFFDIR/lib/libtiff.a $LOCAL_LIBTIFFDIR/lib/libjpeg.a $LOCAL_LIBTIFFDIR/lib/libz.a -lole32 -luuid -lwsock32"
|
||||
LIBTIFF_CFLAGS="-I$LOCAL_LIBTIFFDIR/include"
|
||||
fi
|
||||
# If GNUWIN32_BASE is defined, it means we are running under
|
||||
# Windows and we should use these builds if available because
|
||||
# they are the best bet
|
||||
if test "x$LIBTIFF_LIBS" = "x" && test "x$GNUWIN32_BASE" != "x" ; then
|
||||
# With version 3.5.7 of gnuwin32 libtiff, we do not need to link
|
||||
# against "$GNUWIN32_BASE/lib/libgw32c.a", so no need to test
|
||||
if test -r "$GNUWIN32_BASE/lib/libtiff.a" && test -r "$GNUWIN32_BASE/lib/libjpeg.a" && test -r "$GNUWIN32_BASE/lib/libz.a" ; then
|
||||
AC_MSG_RESULT($GNUWIN32_BASE/lib/libtiff.a)
|
||||
# With 3.5.7 version of libtiff, no need to add
|
||||
# $GNUWIN32_BASE/lib/libgw32c.a after $GNUWIN32_BASE/lib/libz.a
|
||||
LIBTIFF_LIBS="$GNUWIN32_BASE/lib/libtiff.a $GNUWIN32_BASE/lib/libjpeg.a $GNUWIN32_BASE/lib/libz.a -lole32 -luuid -lwsock32"
|
||||
else
|
||||
AC_MSG_RESULT([GNUWIN32 not found or incomplete. Trying something else])
|
||||
fi
|
||||
fi
|
||||
# If LIBTIFF_LIBS is still not defined after potentially going
|
||||
# the GNUWIN32 route, then try using home built versions
|
||||
if test "x$LIBTIFF_LIBS" = "x" ; then
|
||||
TIFF_PACKAGE="$HOME_UNIX/packages/libtiff/libtiff"
|
||||
if test -d "$TIFF_PACKAGE" ; then
|
||||
LIBTIFF_LIBS="$TIFF_PACKAGE/libtiff.a"
|
||||
LIBTIFF_CFLAGS="-I$TIFF_PACKAGE"
|
||||
else
|
||||
LIBTIFF_LIBS="-ltiff"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
elif test "x$ac_libtiff" != "xno" ; then
|
||||
test "x${LIBTIFF_LIBS+set}" != "xset" && LIBTIFF_LIBS="$ac_libtiff/libtiff.a"
|
||||
test "x${LIBTIFF_CFLAGS+set}" != "xset" && LIBTIFF_CFLAGS="-I$ac_libtiff"
|
||||
fi
|
||||
# Try linking - recall that -Wall is typically on, and any warning
|
||||
# will cause this test to fail... This, by the way, is one of the
|
||||
# reasons we cannot run this test when using the Microsoft compiler (cl),
|
||||
# which outputs tons of "garbage" on stdout:
|
||||
if test "x$ac_libtiff" != "xno" ; then
|
||||
AC_MSG_CHECKING([linking with $LIBTIFF_LIBS])
|
||||
save_CFLAGS="$CFLAGS"
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $LIBTIFF_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $LIBTIFF_CFLAGS"
|
||||
LIBS="$LIBS $LIBTIFF_LIBS -lm"
|
||||
AC_TRY_LINK([
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <tiffio.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif ],[
|
||||
TIFFClose((TIFF *) 0);],
|
||||
[ac_libtiff=ok],[ac_libtiff=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
LIBS="$save_LIBS"
|
||||
AC_MSG_RESULT($ac_libtiff)
|
||||
fi
|
||||
fi
|
||||
# Finish
|
||||
if test "x$ac_libtiff" = "xno"; then
|
||||
LIBTIFF_CFLAGS= ; LIBTIFF_LIBS=
|
||||
ifelse([$2],,:,[$2])
|
||||
else
|
||||
AC_DEFINE(HAVE_LIBTIFF,1,[Define if you have the www.libtiff.org LIBTIFF library.])
|
||||
AC_MSG_RESULT([setting LIBTIFF_CFLAGS=$LIBTIFF_CFLAGS])
|
||||
AC_MSG_RESULT([setting LIBTIFF_LIBS=$LIBTIFF_LIBS])
|
||||
CFLAGS="$LIBTIFF_CFLAGS $CFLAGS"
|
||||
CXXFLAGS="$LIBTIFF_CFLAGS $CXXFLAGS"
|
||||
if test "x$CXX" = "xcl.exe" ; then
|
||||
LIBS="$LIBTIFF_LIBS $LIBS"
|
||||
else
|
||||
LIBS="$LIBTIFF_LIBS $LIBS -lm"
|
||||
fi
|
||||
ifelse([$1],,:,[$1])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_LIBTIFF, test x$ac_libtiff != xno)
|
||||
])
|
||||
|
@ -1,5 +1,5 @@
|
||||
SUBDIRS =
|
||||
CXXFLAGS = -DTESSDATA_PREFIX=@datadir@/
|
||||
AM_CXXFLAGS = -DTESSDATA_PREFIX=@datadir@/
|
||||
|
||||
include_HEADERS = \
|
||||
basedir.h bits16.h clst.h debugwin.h elst2.h elst.h errcode.h \
|
||||
|
@ -1,28 +0,0 @@
|
||||
dnl Available from the GNU Autoconf Macro Archive at:
|
||||
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_compile_check_sizeof.html
|
||||
dnl
|
||||
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
||||
[changequote(<<, >>)dnl
|
||||
dnl The name to #define.
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
||||
dnl The cache variable name.
|
||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
||||
changequote([, ])dnl
|
||||
AC_MSG_CHECKING(size of $1)
|
||||
AC_CACHE_VAL(AC_CV_NAME,
|
||||
[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
|
||||
AC_TRY_COMPILE([#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
$2
|
||||
], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
||||
if test x$AC_CV_NAME != x ; then break; fi
|
||||
done
|
||||
])
|
||||
if test x$AC_CV_NAME = x ; then
|
||||
AC_MSG_ERROR([cannot determine a size for $1])
|
||||
fi
|
||||
AC_MSG_RESULT($AC_CV_NAME)
|
||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
||||
undefine([AC_TYPE_NAME])dnl
|
||||
undefine([AC_CV_NAME])dnl
|
||||
])
|
@ -1,552 +0,0 @@
|
||||
##### http://autoconf-archive.cryp.to/ac_create_stdint_h.html
|
||||
#
|
||||
# OBSOLETE MACRO
|
||||
#
|
||||
# Replaced by AX_CREATE_STDINT_H.
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AC_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
|
||||
# existence of an include file <stdint.h> that defines a set of
|
||||
# typedefs, especially uint8_t,int32_t,uintptr_t. Many older
|
||||
# installations will not provide this file, but some will have the
|
||||
# very same definitions in <inttypes.h>. In other enviroments we can
|
||||
# use the inet-types in <sys/types.h> which would define the typedefs
|
||||
# int8_t and u_int8_t respectivly.
|
||||
#
|
||||
# This macros will create a local "_stdint.h" or the headerfile given
|
||||
# as an argument. In many cases that file will just have a singular
|
||||
# "#include <stdint.h>" or "#include <inttypes.h>" statement, while
|
||||
# in other environments it will provide the set of basic 'stdint's
|
||||
# defined:
|
||||
# int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
|
||||
# int_least32_t.. int_fast32_t.. intmax_t which may or may not rely
|
||||
# on the definitions of other files, or using the
|
||||
# AC_COMPILE_CHECK_SIZEOF macro to determine the actual sizeof each
|
||||
# type.
|
||||
#
|
||||
# if your header files require the stdint-types you will want to
|
||||
# create an installable file mylib-int.h that all your other
|
||||
# installable header may include. So if you have a library package
|
||||
# named "mylib", just use
|
||||
#
|
||||
# AC_CREATE_STDINT_H(mylib-int.h)
|
||||
#
|
||||
# in configure.in and go to install that very header file in
|
||||
# Makefile.am along with the other headers (mylib.h) - and the
|
||||
# mylib-specific headers can simply use "#include <mylib-int.h>" to
|
||||
# obtain the stdint-types.
|
||||
#
|
||||
# Remember, if the system already had a valid <stdint.h>, the
|
||||
# generated file will include it directly. No need for fuzzy
|
||||
# HAVE_STDINT_H things...
|
||||
#
|
||||
# (note also the newer variant AX_CREATE_STDINT_H of this macro)
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2006-10-13
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
|
||||
#
|
||||
# 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, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AC_CREATE_STDINT_H],
|
||||
[# ------ AC CREATE STDINT H -------------------------------------
|
||||
AC_MSG_CHECKING([for stdint-types....])
|
||||
ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
|
||||
if test "$ac_stdint_h" = "stdint.h" ; then
|
||||
AC_MSG_RESULT("(are you sure you want them in ./stdint.h?)")
|
||||
elif test "$ac_stdint_h" = "inttypes.h" ; then
|
||||
AC_MSG_RESULT("(are you sure you want them in ./inttypes.h?)")
|
||||
else
|
||||
AC_MSG_RESULT("(putting them into $ac_stdint_h)")
|
||||
fi
|
||||
|
||||
inttype_headers=`echo inttypes.h sys/inttypes.h sys/inttypes.h $2 \
|
||||
| sed -e 's/,/ /g'`
|
||||
|
||||
ac_cv_header_stdint_x="no-file"
|
||||
ac_cv_header_stdint_o="no-file"
|
||||
ac_cv_header_stdint_u="no-file"
|
||||
for i in stdint.h $inttype_headers ; do
|
||||
unset ac_cv_type_uintptr_t
|
||||
unset ac_cv_type_uint64_t
|
||||
_AC_CHECK_TYPE_NEW(uintptr_t,[ac_cv_header_stdint_x=$i],dnl
|
||||
continue,[#include <$i>])
|
||||
AC_CHECK_TYPE(uint64_t,[and64="(uint64_t too)"],[and64=""],[#include<$i>])
|
||||
AC_MSG_RESULT(... seen our uintptr_t in $i $and64)
|
||||
break;
|
||||
done
|
||||
if test "$ac_cv_header_stdint_x" = "no-file" ; then
|
||||
for i in stdint.h $inttype_headers ; do
|
||||
unset ac_cv_type_uint32_t
|
||||
unset ac_cv_type_uint64_t
|
||||
AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],dnl
|
||||
continue,[#include <$i>])
|
||||
AC_CHECK_TYPE(uint64_t,[and64="(uint64_t too)"],[and64=""],[#include<$i>])
|
||||
AC_MSG_RESULT(... seen our uint32_t in $i $and64)
|
||||
break;
|
||||
done
|
||||
if test "$ac_cv_header_stdint_o" = "no-file" ; then
|
||||
for i in sys/types.h $inttype_headers ; do
|
||||
unset ac_cv_type_u_int32_t
|
||||
unset ac_cv_type_u_int64_t
|
||||
AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],dnl
|
||||
continue,[#include <$i>])
|
||||
AC_CHECK_TYPE(uint64_t,[and64="(u_int64_t too)"],[and64=""],[#include<$i>])
|
||||
AC_MSG_RESULT(... seen our u_int32_t in $i $and64)
|
||||
break;
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# ----------------- DONE inttypes.h checks MAYBE C basic types --------
|
||||
|
||||
if test "$ac_cv_header_stdint_x" = "no-file" ; then
|
||||
AC_COMPILE_CHECK_SIZEOF(char)
|
||||
AC_COMPILE_CHECK_SIZEOF(short)
|
||||
AC_COMPILE_CHECK_SIZEOF(int)
|
||||
AC_COMPILE_CHECK_SIZEOF(long)
|
||||
AC_COMPILE_CHECK_SIZEOF(void*)
|
||||
ac_cv_header_stdint_test="yes"
|
||||
else
|
||||
ac_cv_header_stdint_test="no"
|
||||
fi
|
||||
|
||||
# ----------------- DONE inttypes.h checks START header -------------
|
||||
_ac_stdint_h=AS_TR_CPP(_$ac_stdint_h)
|
||||
AC_MSG_RESULT(creating $ac_stdint_h : $_ac_stdint_h)
|
||||
echo "#ifndef" $_ac_stdint_h >$ac_stdint_h
|
||||
echo "#define" $_ac_stdint_h "1" >>$ac_stdint_h
|
||||
echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint_h
|
||||
echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint_h
|
||||
if test "$GCC" = "yes" ; then
|
||||
echo "/* generated using a gnu compiler version" `$CC --version` "*/" \
|
||||
>>$ac_stdint_h
|
||||
else
|
||||
echo "/* generated using $CC */" >>$ac_stdint_h
|
||||
fi
|
||||
echo "" >>$ac_stdint_h
|
||||
|
||||
if test "$ac_cv_header_stdint_x" != "no-file" ; then
|
||||
ac_cv_header_stdint="$ac_cv_header_stdint_x"
|
||||
elif test "$ac_cv_header_stdint_o" != "no-file" ; then
|
||||
ac_cv_header_stdint="$ac_cv_header_stdint_o"
|
||||
elif test "$ac_cv_header_stdint_u" != "no-file" ; then
|
||||
ac_cv_header_stdint="$ac_cv_header_stdint_u"
|
||||
else
|
||||
ac_cv_header_stdint="stddef.h"
|
||||
fi
|
||||
|
||||
# ----------------- See if int_least and int_fast types are present
|
||||
unset ac_cv_type_int_least32_t
|
||||
unset ac_cv_type_int_fast32_t
|
||||
AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
|
||||
AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
|
||||
|
||||
if test "$ac_cv_header_stdint" != "stddef.h" ; then
|
||||
if test "$ac_cv_header_stdint" != "stdint.h" ; then
|
||||
AC_MSG_RESULT(..adding include stddef.h)
|
||||
echo "#include <stddef.h>" >>$ac_stdint_h
|
||||
fi ; fi
|
||||
AC_MSG_RESULT(..adding include $ac_cv_header_stdint)
|
||||
echo "#include <$ac_cv_header_stdint>" >>$ac_stdint_h
|
||||
echo "" >>$ac_stdint_h
|
||||
|
||||
# ----------------- DONE header START basic int types -------------
|
||||
if test "$ac_cv_header_stdint_x" = "no-file" ; then
|
||||
AC_MSG_RESULT(... need to look at C basic types)
|
||||
dnl ac_cv_header_stdint_test="yes" # moved up before creating the file
|
||||
else
|
||||
AC_MSG_RESULT(... seen good stdint.h inttypes)
|
||||
dnl ac_cv_header_stdint_test="no" # moved up before creating the file
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_stdint_u" != "no-file" ; then
|
||||
AC_MSG_RESULT(... seen bsd/sysv typedefs)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
|
||||
typedef u_int8_t uint8_t;
|
||||
typedef u_int16_t uint16_t;
|
||||
typedef u_int32_t uint32_t;
|
||||
EOF
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* glibc compatibility */
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
#endif
|
||||
EOF
|
||||
fi
|
||||
|
||||
ac_cv_sizeof_x="$ac_cv_sizeof_char:$ac_cv_sizeof_short"
|
||||
ac_cv_sizeof_X="$ac_cv_sizeof_x:$ac_cv_sizeof_int"
|
||||
ac_cv_sizeof_X="$ac_cv_sizeof_X:$ac_cv_sizeof_voidp:$ac_cv_sizeof_long"
|
||||
if test "$ac_cv_header_stdint" = "stddef.h" ; then
|
||||
# we must guess all the basic types. Apart from byte-adressable system,
|
||||
# there a few 32-bit-only dsp-systems. nibble-addressable systems are way off.
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
/* ------------ BITSPECIFIC INTTYPES SECTION --------------- */
|
||||
EOF
|
||||
t="typedefs for a"
|
||||
case "$ac_cv_sizeof_X" in
|
||||
1:2:2:2:4) AC_MSG_RESULT(..adding $t normal 16-bit system)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
/* a normal 16-bit system */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned long uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef long int32_t;
|
||||
#endif
|
||||
EOF
|
||||
;;
|
||||
1:2:2:4:4) AC_MSG_RESULT(..adding $t 32-bit system derived from a 16-bit)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
/* a 32-bit system derived from a 16-bit */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
EOF
|
||||
;;
|
||||
1:2:4:4:4) AC_MSG_RESULT(..adding $t normal 32-bit system)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
/* a normal 32-bit system */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
EOF
|
||||
;;
|
||||
1:2:4:4:8) AC_MSG_RESULT(..adding $t 32-bit system prepared for 64-bit)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* a 32-bit system prepared for 64-bit */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
EOF
|
||||
;;
|
||||
1:2:4:8:8) AC_MSG_RESULT(..adding $t normal 64-bit system)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* a normal 64-bit system */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
EOF
|
||||
;;
|
||||
1:2:4:8:4) AC_MSG_RESULT(..adding $t 64-bit system derived from a 32-bit)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* a 64-bit system derived from a 32-bit system */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
EOF
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([ $ac_cv_sizeof_X dnl
|
||||
what is that a system? contact the author, quick! http://ac-archive.sf.net])
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# ------------- DONE basic int types START int64_t types ------------
|
||||
if test "$ac_cv_type_uint64_t" = "yes"
|
||||
then AC_MSG_RESULT(... seen good uint64_t)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* system headers have good uint64_t */
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
#endif
|
||||
EOF
|
||||
|
||||
elif test "$ac_cv_type_u_int64_t" = "yes"
|
||||
then AC_MSG_RESULT(..adding typedef u_int64_t uint64_t)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* system headers have an u_int64_t */
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef u_int64_t uint64_t;
|
||||
#endif
|
||||
EOF
|
||||
else AC_MSG_RESULT(..adding generic uint64_t runtime checks)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* -------------------- 64 BIT GENERIC SECTION -------------------- */
|
||||
/* here are some common heuristics using compiler runtime specifics */
|
||||
#if defined __STDC_VERSION__ && defined __STDC_VERSION__ > 199901L
|
||||
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#endif
|
||||
|
||||
#elif !defined __STRICT_ANSI__
|
||||
#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
|
||||
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#endif
|
||||
|
||||
#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
|
||||
dnl /* note: all ELF-systems seem to have loff-support which needs 64-bit */
|
||||
|
||||
#if !defined _NO_LONGLONG
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#elif defined __alpha || (defined __mips && defined _ABIN32)
|
||||
|
||||
#if !defined _NO_LONGLONG
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef long int64_t;
|
||||
typedef unsigned long uint64_t;
|
||||
#endif
|
||||
#endif
|
||||
/* compiler/cpu type ... or just ISO C99 */
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
|
||||
# plus a default 64-bit for systems that are likely to be 64-bit ready
|
||||
case "$ac_cv_sizeof_x:$ac_cv_sizeof_voidp:$ac_cv_sizeof_long" in
|
||||
1:2:8:8) AC_MSG_RESULT(..adding uint64_t default, normal 64-bit system)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
/* DEFAULT: */
|
||||
/* seen normal 64-bit system, CC has sizeof(long and void*) == 8 bytes */
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef long int64_t;
|
||||
typedef unsigned long uint64_t;
|
||||
#endif
|
||||
EOF
|
||||
;;
|
||||
1:2:4:8) AC_MSG_RESULT(..adding uint64_t default, typedef to long)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
/* DEFAULT: */
|
||||
/* seen 32-bit system prepared for 64-bit, CC has sizeof(long) == 8 bytes */
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef long int64_t;
|
||||
typedef unsigned long uint64_t;
|
||||
#endif
|
||||
EOF
|
||||
;;
|
||||
1:2:8:4) AC_MSG_RESULT(..adding uint64_t default, typedef long long)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
/* DEFAULT: */
|
||||
/* seen 64-bit derived from a 32-bit, CC has sizeof(long) == 4 bytes */
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#endif
|
||||
EOF
|
||||
;;
|
||||
*)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
/* NOTE: */
|
||||
/* the configure-checks for the basic types did not make us believe */
|
||||
/* that we could add a fallback to a 'long long' typedef to int64_t */
|
||||
EOF
|
||||
esac
|
||||
fi
|
||||
|
||||
# ------------- DONE int64_t types START intptr types ------------
|
||||
if test "$ac_cv_header_stdint_x" = "no-file" ; then
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* -------------------------- INPTR SECTION --------------------------- */
|
||||
EOF
|
||||
case "$ac_cv_sizeof_x:$ac_cv_sizeof_voidp" in
|
||||
1:2:2)
|
||||
a="int16_t" ; cat >>$ac_stdint_h <<EOF
|
||||
/* we tested sizeof(void*) to be of 2 chars, hence we declare it 16-bit */
|
||||
|
||||
typedef uint16_t uintptr_t;
|
||||
typedef int16_t intptr_t;
|
||||
EOF
|
||||
;;
|
||||
1:2:4)
|
||||
a="int32_t" ; cat >>$ac_stdint_h <<EOF
|
||||
/* we tested sizeof(void*) to be of 4 chars, hence we declare it 32-bit */
|
||||
|
||||
typedef uint32_t uintptr_t;
|
||||
typedef int32_t intptr_t;
|
||||
EOF
|
||||
;;
|
||||
1:2:8)
|
||||
a="int64_t" ; cat >>$ac_stdint_h <<EOF
|
||||
/* we tested sizeof(void*) to be of 8 chars, hence we declare it 64-bit */
|
||||
|
||||
typedef uint64_t uintptr_t;
|
||||
typedef int64_t intptr_t;
|
||||
EOF
|
||||
;;
|
||||
*)
|
||||
a="long" ; cat >>$ac_stdint_h <<EOF
|
||||
/* we tested sizeof(void*) but got no guess, hence we declare it as if long */
|
||||
|
||||
typedef unsigned long uintptr_t;
|
||||
typedef long intptr_t;
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT(..adding typedef $a intptr_t)
|
||||
fi
|
||||
|
||||
# ------------- DONE intptr types START int_least types ------------
|
||||
if test "$ac_cv_type_int_least32_t" = "no"; then
|
||||
AC_MSG_RESULT(..adding generic int_least-types)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* --------------GENERIC INT_LEAST ------------------ */
|
||||
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int32_t int_least32_t;
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef int64_t int_least64_t;
|
||||
#endif
|
||||
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef uint64_t uint_least64_t;
|
||||
#endif
|
||||
EOF
|
||||
fi
|
||||
|
||||
# ------------- DONE intptr types START int_least types ------------
|
||||
if test "$ac_cv_type_int_fast32_t" = "no"; then
|
||||
AC_MSG_RESULT(..adding generic int_fast-types)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* --------------GENERIC INT_FAST ------------------ */
|
||||
|
||||
typedef int8_t int_fast8_t;
|
||||
typedef int32_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef int64_t int_fast64_t;
|
||||
#endif
|
||||
|
||||
typedef uint8_t uint_fast8_t;
|
||||
typedef uint32_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef uint64_t uint_fast64_t;
|
||||
#endif
|
||||
EOF
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_stdint_x" = "no-file" ; then
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
#else
|
||||
typedef long int intmax_t;
|
||||
typedef unsigned long uintmax_t;
|
||||
#endif
|
||||
EOF
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT(... DONE $ac_stdint_h)
|
||||
cat >>$ac_stdint_h <<EOF
|
||||
|
||||
/* once */
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
])
|
||||
|
||||
dnl quote from SunOS-5.8 sys/inttypes.h:
|
||||
dnl Use at your own risk. As of February 1996, the committee is squarely
|
||||
dnl behind the fixed sized types; the "least" and "fast" types are still being
|
||||
dnl discussed. The probability that the "fast" types may be removed before
|
||||
dnl the standard is finalized is high enough that they are not currently
|
||||
dnl implemented.
|
@ -1,73 +0,0 @@
|
||||
dnl Available from the GNU Autoconf Macro Archive at:
|
||||
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_define_versionlevel.html
|
||||
dnl
|
||||
AC_DEFUN([AC_DEFINE_VERSIONLEVEL],
|
||||
[
|
||||
ac_versionlevel_strdf=`echo ifelse($2, , $VERSION, $2) | sed -e 's:[[A-Z-]]*:.:' -e 's:[[^0-9.]]::g' -e 's:^[[.]]*::'`
|
||||
dnl commented out by Luc, we do not need any output for the
|
||||
dnl way this M4 macro is called at the moment.
|
||||
dnl AC_MSG_CHECKING(versionlevel $ac_versionlevel_strdf)
|
||||
case $ac_versionlevel_strdf in
|
||||
*.*.*.|*.*.*.*) :
|
||||
ac_versionlevel_major=`echo $ac_versionlevel_strdf`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_major | sed -e 's/[[^.]]*[[.]]//'`
|
||||
ac_versionlevel_patch=`echo $ac_versionlevel_minor | sed -e 's/[[^.]]*[[.]]//'`
|
||||
ac_versionlevel_major=`echo $ac_versionlevel_major | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_patch=`echo $ac_versionlevel_patch | sed -e 's/[[.]].*//'`
|
||||
$1=`expr $ac_versionlevel_major '*' 1000000 \
|
||||
+ $ac_versionlevel_minor '*' 10000 \
|
||||
+ $ac_versionlevel_patch \
|
||||
+ 1` ;;
|
||||
*.*.*) :
|
||||
ac_versionlevel_major=`echo $ac_versionlevel_strdf`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_major | sed -e 's/[[^.]]*[[.]]//'`
|
||||
ac_versionlevel_patch=`echo $ac_versionlevel_minor | sed -e 's/[[^.]]*[[.]]//'`
|
||||
ac_versionlevel_major=`echo $ac_versionlevel_major | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_patch=`echo $ac_versionlevel_patch | sed -e 's/[[.]].*//'`
|
||||
$1=`expr $ac_versionlevel_major '*' 1000000 \
|
||||
+ $ac_versionlevel_minor '*' 10000 \
|
||||
+ $ac_versionlevel_patch` ;;
|
||||
*.*.) :
|
||||
ac_versionlevel_major=`echo $ac_versionlevel_strdf`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_major | sed -e 's/[[^.]]*[[.]]//'`
|
||||
ac_versionlevel_major=`echo $ac_versionlevel_major | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_patch=0
|
||||
$1=`expr $ac_versionlevel_major '*' 1000000 \
|
||||
+ $ac_versionlevel_minor '*' 10000 \
|
||||
+ 1000 \
|
||||
+ $ac_versionlevel_patch` ;;
|
||||
*.*) :
|
||||
ac_versionlevel_major=`echo $ac_versionlevel_strdf`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_major | sed -e 's/[[^.]]*[[.]]//'`
|
||||
ac_versionlevel_major=`echo $ac_versionlevel_major | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_patch=0
|
||||
$1=`expr $ac_versionlevel_major '*' 1000000 \
|
||||
+ $ac_versionlevel_minor '*' 10000 \
|
||||
+ $ac_versionlevel_patch` ;;
|
||||
*.) :
|
||||
ac_versionlevel_major=0
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_strdf`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_patch=0
|
||||
$1=`expr $ac_versionlevel_major '*' 1000000 \
|
||||
+ $ac_versionlevel_minor '*' 10000 \
|
||||
+ 1000 \
|
||||
+ $ac_versionlevel_patch` ;;
|
||||
*) :
|
||||
ac_versionlevel_major=0
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_strdf`
|
||||
ac_versionlevel_minor=`echo $ac_versionlevel_minor | sed -e 's/[[.]].*//'`
|
||||
ac_versionlevel_patch=0
|
||||
$1=`expr $ac_versionlevel_major '*' 1000000 \
|
||||
+ $ac_versionlevel_minor '*' 10000 \
|
||||
+ $ac_versionlevel_patch` ;;
|
||||
esac
|
||||
dnl Also commented out by Luc for now
|
||||
dnl AC_MSG_RESULT($[$1])
|
||||
AC_DEFINE_UNQUOTED( $1, $[$1], ifelse( $3, , $PACKAGE versionlevel, $3))
|
||||
])
|
||||
|
@ -1,666 +0,0 @@
|
||||
# Copyright (c) 2003 Luc Vincent
|
||||
#
|
||||
# This M4 script includes a number of non-standard
|
||||
# autoconf macros that are typically available
|
||||
# at the GNU Autoconf Macro Archive:
|
||||
#
|
||||
# http://www.gnu.org/software/ac-archive/
|
||||
#
|
||||
# Specially developed macros are placed a the
|
||||
# end of this file. Some of them were originally written
|
||||
# by L. Bottou and Y. LeCun
|
||||
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_PROG_DOXYGEN_VERSION(VERSION,
|
||||
dnl [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
dnl
|
||||
dnl Check if doxygen is present and if version on machine
|
||||
dnl is at least version number supplied as argument
|
||||
dnl
|
||||
dnl Makes sure that doxygen supports the version indicated. If true the
|
||||
dnl shell commands in ACTION-IF-TRUE are executed. If not the shell
|
||||
dnl commands in ACTION-IF-FALSE are run. Note if $DOXYGEN is not set (for
|
||||
dnl example by running AC_CHECK_PROG or AC_PATH_PROG),
|
||||
dnl AC_CHECK_PROG(DOXYGEN, doxygen, doxygen) will be run.
|
||||
dnl
|
||||
dnl Example:
|
||||
dnl
|
||||
dnl AC_PROG_DOXYGEN_VERSION(1.3.2)
|
||||
dnl
|
||||
dnl This will check to make sure that the version of doxygen you have
|
||||
dnl is at least version 1.3.2
|
||||
dnl -------------------------------------------------------
|
||||
|
||||
AC_DEFUN([AC_PROG_DOXYGEN_VERSION],[dnl
|
||||
# Make sure we have doxygen
|
||||
if test -z "$DOXYGEN"; then
|
||||
# AC_CHECK_PROG(DOXYGEN,doxygen,doxygen)
|
||||
AC_PATH_PROG(DOXYGEN,doxygen)
|
||||
fi
|
||||
|
||||
# Check if version of Doxygen is sufficient
|
||||
ac_doxygen_version=$1
|
||||
|
||||
if test "x$DOXYGEN" != "x"; then
|
||||
AC_MSG_CHECKING(for doxygen version at least equal to $ac_doxygen_version)
|
||||
# NB: It would be nice to log the error if there is one, but we cannot rely
|
||||
# on autoconf internals...
|
||||
# This is the actual version of doxygen
|
||||
doxy_version=`$DOXYGEN --version`
|
||||
# Need to turn these floating point numbers into integers:
|
||||
AC_DEFINE_VERSIONLEVEL(DOXYGEN_VERSION_REQUIRED, $ac_doxygen_version)
|
||||
AC_DEFINE_VERSIONLEVEL(DOXYGEN_VERSION_ACTUAL, $doxy_version)
|
||||
|
||||
if test $DOXYGEN_VERSION_ACTUAL -lt $DOXYGEN_VERSION_REQUIRED; then
|
||||
AC_MSG_RESULT(no);
|
||||
$3
|
||||
else
|
||||
AC_MSG_RESULT(ok);
|
||||
$2
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN(could not find doxygen)
|
||||
fi
|
||||
])dnl
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_DEFINE_INSTALL_PATHS
|
||||
dnl Define various installation paths
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN([AC_DEFINE_INSTALL_PATHS],[
|
||||
save_prefix="${prefix}"
|
||||
save_exec_prefix="${exec_prefix}"
|
||||
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
|
||||
test "x$exec_prefix" = xNONE && exec_prefix="$prefix"
|
||||
DIR_PREFIX="`eval echo \"$prefix\"`"
|
||||
AC_DEFINE_UNQUOTED(DIR_PREFIX,["${DIR_PREFIX}"],[directory "prefix"])
|
||||
DIR_EXEC_PREFIX="`eval echo \"$exec_prefix\"`"
|
||||
AC_DEFINE_UNQUOTED(DIR_EXEC_PREFIX,["${DIR_EXEC_PREFIX}"],[directory "exec_prefix"])
|
||||
DIR_BINDIR="`eval echo \"$bindir\"`"
|
||||
AC_DEFINE_UNQUOTED(DIR_BINDIR,["${DIR_BINDIR}"],[directory "bindir"])
|
||||
DIR_LIBDIR="`eval echo \"$libdir\"`"
|
||||
AC_DEFINE_UNQUOTED(DIR_LIBDIR,["${DIR_LIBDIR}"],[directory "libdir"])
|
||||
DIR_DATADIR="`eval echo \"$datadir\"`"
|
||||
AC_DEFINE_UNQUOTED(DIR_DATADIR,["${DIR_DATADIR}"],[directory "datadir"])
|
||||
DIR_MANDIR="`eval echo \"$mandir\"`"
|
||||
AC_DEFINE_UNQUOTED(DIR_MANDIR,["${DIR_MANDIR}"],[directory "mandir"])
|
||||
prefix="${save_prefix}"
|
||||
exec_prefix="${save_exec_prefix}"
|
||||
])
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_CHECK_CXX_OPT(OPTION,
|
||||
dnl ACTION-IF-OKAY,ACTION-IF-NOT-OKAY)
|
||||
dnl Check if compiler accepts option OPTION.
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN(AC_CHECK_CXX_OPT,[
|
||||
opt="$1"
|
||||
AC_MSG_CHECKING([if $CXX accepts $opt])
|
||||
echo 'void f(){}' > conftest.cc
|
||||
if test -z "`${CXX} ${CXXFLAGS} ${OPTS} $opt -c conftest.cc 2>&1`"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
rm conftest.*
|
||||
$2
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
rm conftest.*
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_CC_OPTIMIZE
|
||||
dnl Setup option --enable-debug
|
||||
dnl Collects optimization/debug option in variable CFLAGS,
|
||||
dnl filtering options already in CFLAGS. Also define
|
||||
dnl DEBUG_MODE if appropriate.
|
||||
dnl Adapted from AC_CXX_OPTIMIZE in djvulibre
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN([AC_CXX_OPTIMIZE],[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug],
|
||||
[Compile with debugging options (default: no)]),
|
||||
[ac_debug=$enableval],[ac_debug=no])
|
||||
OPTS=
|
||||
AC_SUBST(OPTS)
|
||||
dnl VCOPTS_COMMON="/nologo /G5 /Zp1 /W3 /Za /Op- /GX"
|
||||
# Note: the /Za option might be nice to have, but it is
|
||||
# incompatible with <windows.h>, which some packages
|
||||
# (like the tiff library) require
|
||||
VCOPTS_COMMON="/nologo /G5 /Zp1 /W3"
|
||||
dnl AC_SUBST(OPTS)
|
||||
saved_CXXFLAGS="$CXXFLAGS"
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CXXFLAGS=
|
||||
CFLAGS=
|
||||
for opt in $saved_CXXFLAGS ; do
|
||||
case $opt in
|
||||
-g*) test $ac_debug != no && OPTS="$OPTS $opt" ;;
|
||||
-O*) ;;
|
||||
*) CXXFLAGS="$CXXFLAGS $opt" ;;
|
||||
esac
|
||||
done
|
||||
for opt in $saved_CFLAGS ; do
|
||||
case $opt in
|
||||
-O*|-g*) ;;
|
||||
*) CFLAGS="$CFLAGS $opt" ;;
|
||||
esac
|
||||
done
|
||||
if test x$ac_debug = xno ; then
|
||||
OPTS=-DNDEBUG
|
||||
if test x$CXX = xcl.exe ; then
|
||||
OPTS="$OPTS $VCOPTS_COMMON /Ow /O2"
|
||||
else
|
||||
AC_CHECK_CXX_OPT([-O3],[OPTS="$OPTS -O3"],
|
||||
[ AC_CHECK_CXX_OPT([-O2], [OPTS="$OPTS -O2"] ) ] )
|
||||
dnl This triggers compiler bugs with gcc-3.2.2 - comment out for now
|
||||
dnl AC_CHECK_CXX_OPT([-funroll-loops], [OPTS="$OPTS -funroll-loops"])
|
||||
cpu=`uname -m 2>/dev/null`
|
||||
test -z "$cpu" && cpu=${host_cpu}
|
||||
case "${host_cpu}" in
|
||||
i?86)
|
||||
opt="-mcpu=${host_cpu}"
|
||||
AC_CHECK_CXX_OPT([$opt], [OPTS="$OPTS $opt"])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
if test x$CXX = xcl.exe ; then
|
||||
OPTS="$OPTS $VCOPTS_COMMON /Od /Z7"
|
||||
fi
|
||||
AC_DEFINE(DEBUG_MODE,1,[Define when compiling in debug mode])
|
||||
fi
|
||||
if test x$CXX != xcl.exe ; then
|
||||
AC_CHECK_CXX_OPT([-Wall],[OPTS="$OPTS -Wall"])
|
||||
fi
|
||||
case x"$ac_debug" in
|
||||
changequote(<<, >>)dnl
|
||||
x[0-9]) OPTS="$OPTS -DDEBUGLVL=$ac_debug" ;;
|
||||
xr*) OPTS="$OPTS -DRUNTIME_DEBUG_ONLY" ;;
|
||||
changequote([, ])dnl
|
||||
esac
|
||||
CXXFLAGS="$CXXFLAGS $OPTS"
|
||||
CFLAGS="$CFLAGS $OPTS"
|
||||
])
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_CXX_MEMBER_TEMPLATES
|
||||
dnl If the compiler supports member templates,
|
||||
dnl define HAVE_MEMBER_TEMPLATES.
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN([AC_CXX_MEMBER_TEMPLATES],
|
||||
[AC_CACHE_CHECK(whether the compiler supports member templates,
|
||||
ac_cv_cxx_member_templates,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([
|
||||
template<class T, int N> class A
|
||||
{ public:
|
||||
template<int N2> A<T,N> operator=(const A<T,N2>& z) { return A<T,N>(); }
|
||||
};],[A<double,4> x; A<double,7> y; x = y; return 0;],
|
||||
ac_cv_cxx_member_templates=yes, ac_cv_cxx_member_templates=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_member_templates" = yes; then
|
||||
AC_DEFINE(HAVE_MEMBER_TEMPLATES,1,
|
||||
[define if the compiler supports member templates])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_CXX_NAMESPACES
|
||||
dnl Define HAVE_NAMESPACES if the compiler supports
|
||||
dnl namespaces.
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN([AC_CXX_NAMESPACES],
|
||||
[AC_CACHE_CHECK(whether the compiler implements namespaces,
|
||||
ac_cv_cxx_namespaces,
|
||||
[ AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
|
||||
[using namespace Outer::Inner; return i;],
|
||||
ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_namespaces" = yes && test "$ac_debug" = no; then
|
||||
AC_DEFINE(HAVE_NAMESPACES,1,
|
||||
[define if the compiler implements namespaces])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_CXX_TYPENAME
|
||||
dnl Define HAVE_TYPENAME if the compiler recognizes
|
||||
dnl keyword typename.
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN([AC_CXX_TYPENAME],
|
||||
[AC_CACHE_CHECK(whether the compiler recognizes typename,
|
||||
ac_cv_cxx_typename,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([template<typename T>class X {public:X(){}};],
|
||||
[X<float> z; return 0;],
|
||||
ac_cv_cxx_typename=yes, ac_cv_cxx_typename=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_typename" = yes; then
|
||||
AC_DEFINE(HAVE_TYPENAME,1,[define if the compiler recognizes typename])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_CXX_STDINCLUDES
|
||||
dnl Define HAVE_STDINCLUDES if the compiler has the
|
||||
dnl new style include files (without the .h)
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN([AC_CXX_STDINCLUDES],
|
||||
[AC_CACHE_CHECK(whether the compiler comes with standard includes,
|
||||
ac_cv_cxx_stdincludes,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([#include <new>
|
||||
struct X { int a; X(int a):a(a){}; };
|
||||
X* foo(void *x) { return new(x) X(2); } ],[],
|
||||
ac_cv_cxx_stdincludes=yes, ac_cv_cxx_stdincludes=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_stdincludes" = yes; then
|
||||
AC_DEFINE(HAVE_STDINCLUDES,1,
|
||||
[define if the compiler comes with standard includes])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_CXX_BOOL
|
||||
dnl If the compiler recognizes bool as a separate built-in type,
|
||||
dnl define HAVE_BOOL. Note that a typedef is not a separate
|
||||
dnl type since you cannot overload a function such that it
|
||||
dnl accepts either the basic type or the typedef.
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN([AC_CXX_BOOL],
|
||||
[AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type,
|
||||
ac_cv_cxx_bool,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE([
|
||||
int f(int x){return 1;}
|
||||
int f(char x){return 1;}
|
||||
int f(bool x){return 1;}
|
||||
],[bool b = true; return f(b);],
|
||||
ac_cv_cxx_bool=yes, ac_cv_cxx_bool=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_bool" = yes; then
|
||||
AC_DEFINE(HAVE_BOOL,1,[define if bool is a built-in type])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_CXX_EXCEPTIONS
|
||||
dnl If the C++ compiler supports exceptions handling (try,
|
||||
dnl throw and catch), define HAVE_EXCEPTIONS.
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN([AC_CXX_EXCEPTIONS],
|
||||
[AC_CACHE_CHECK(whether the compiler supports exceptions,
|
||||
ac_cv_cxx_exceptions,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE(,[try { throw 1; } catch (int i) { return i; }],
|
||||
ac_cv_cxx_exceptions=yes, ac_cv_cxx_exceptions=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ac_cv_cxx_exceptions" = yes; then
|
||||
AC_DEFINE(HAVE_EXCEPTIONS,1,[define if the compiler supports exceptions])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl @synopsis AC_CXX_RPO
|
||||
dnl Defines option --enable-rpo and searches program RPO.
|
||||
dnl Set output variables CXXRPOFLAGS and RPO.
|
||||
dnl -------------------------------------------------------
|
||||
AC_DEFUN([AC_CXX_RPO],
|
||||
[ CXXRPOFLAGS=
|
||||
RPO_YES='#'
|
||||
RPO_NO=''
|
||||
if test x$GXX = xyes ; then
|
||||
AC_ARG_ENABLE([rpo],
|
||||
AC_HELP_STRING([--enable-rpo],
|
||||
[Enable compilation with option -frepo]),
|
||||
[ac_rpo=$enableval], [ac_rpo=no] )
|
||||
if test x$ac_rpo != xno ; then
|
||||
CXXRPOFLAGS='-frepo -fno-rtti'
|
||||
RPO_YES=''
|
||||
RPO_NO='#'
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CXXRPOFLAGS)
|
||||
AC_SUBST(RPO_YES)
|
||||
AC_SUBST(RPO_NO)
|
||||
])
|
||||
|
||||
|
||||
dnl ------------------------------------------------------------------
|
||||
dnl @synopsis AC_PATH_GNUWIN32([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
dnl Process option --with-gnuwin32.
|
||||
dnl Try to determine where GNUWIN32 is located
|
||||
dnl Define GNUWIN32 accordingly (either blank or PATH)
|
||||
dnl Also update the LDFLAGS and CFLAGS accordingly
|
||||
dnl ------------------------------------------------------------------
|
||||
AC_DEFUN([AC_PATH_GNUWIN32],
|
||||
[
|
||||
# Test whether we are running on Windows. This test is becoming
|
||||
# useless because other environments exist under Windows, such
|
||||
# as mingw, whihc gives host i686-pc-mingw32. Just remove this test
|
||||
# for now by setting variable to yes all the time.
|
||||
# AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
|
||||
# case $host_os in
|
||||
# *cygwin* ) USING_CYGWIN_OR_MINGW=yes;;
|
||||
# *mingw* ) USING_CYGWIN_OR_MINGW=yes;;
|
||||
# * ) USING_CYGWIN_OR_MINGW=no;;
|
||||
# esac
|
||||
USING_CYGWIN_OR_MINGW=yes
|
||||
# If running on Windows, do some tests
|
||||
if test x$USING_CYGWIN_OR_MINGW = xyes ; then
|
||||
AC_ARG_VAR(GNUWIN32_DIR,[Base directory of GnuWin32 packages])
|
||||
ac_gnuwin32=no
|
||||
AC_ARG_WITH(gnuwin32,
|
||||
AC_HELP_STRING([--with-gnuwin32=DIR],
|
||||
[where the GnuWin32 packages are installed]),
|
||||
[ac_gnuwin32=$withval], [ac_gnuwin32=yes] )
|
||||
# Process specification
|
||||
AC_MSG_CHECKING([for GnuWin32 directory])
|
||||
if test x$ac_gnuwin32 = xyes ; then
|
||||
# GNUWIN32_BASE could have been set on the command line
|
||||
if test x$GNUWIN32_BASE != x ; then
|
||||
if test -d "$GNUWIN32_BASE" ; then
|
||||
AC_MSG_RESULT([verified at $GNUWIN32_BASE])
|
||||
else
|
||||
# AC_MSG_RESULT([no GnuWin32 at $GNUWIN32_BASE. Looking elsewhere])
|
||||
GNUWIN32_BASE=
|
||||
fi
|
||||
# Otherwise, GNUWIN32 is an environment variable that the user can set
|
||||
elif test x$GNUWIN32 != x ; then
|
||||
if test -d "$GNUWIN32" ; then
|
||||
GNUWIN32_BASE=$GNUWIN32
|
||||
AC_MSG_RESULT([verified at $GNUWIN32_BASE])
|
||||
else
|
||||
# AC_MSG_RESULT([no GnuWin32 at $GNUWIN32. Looking elsewhere])
|
||||
GNUWIN32_BASE=
|
||||
fi
|
||||
fi
|
||||
# Look in default locations if needed:
|
||||
if test x$GNUWIN32_BASE = x ; then
|
||||
if test -d "C:/Program Files/GnuWin32" ; then
|
||||
GNUWIN32_BASE="C:/Program Files/GnuWin32"
|
||||
AC_MSG_RESULT([$GNUWIN32_BASE])
|
||||
elif test -d "C:/pckg/GnuWin32" ; then
|
||||
GNUWIN32_BASE="C:/pckg/GnuWin32"
|
||||
AC_MSG_RESULT([$GNUWIN32_BASE])
|
||||
else
|
||||
AC_MSG_RESULT([not found])
|
||||
fi
|
||||
fi
|
||||
# If directory location specified on command line
|
||||
elif test x$ac_gnuwin32 != xno ; then
|
||||
if test -d "$ac_gnuwin32" ; then
|
||||
GNUWIN32_BASE="$ac_gnuwin32"
|
||||
AC_MSG_RESULT([verified at $GNUWIN32_BASE])
|
||||
else
|
||||
GNUWIN32_BASE=
|
||||
AC_MSG_RESULT([not found])
|
||||
fi
|
||||
fi
|
||||
# Now we can update LDFLAGS, CFLAGS and CXXFLAGS
|
||||
# Do it in such a way that GnuWin32 has precedence
|
||||
# over system includes and libraries
|
||||
if test x$GNUWIN32_BASE != x ; then
|
||||
CFLAGS="-I$GNUWIN32_BASE/include $CFLAGS"
|
||||
CXXFLAGS="-I$GNUWIN32_BASE/include $CXXFLAGS"
|
||||
if test x$CXX != xcl.exe ; then
|
||||
LDFLAGS="-L$GNUWIN32_BASE/lib $LDFLAGS"
|
||||
fi
|
||||
fi
|
||||
# If not running on cygwin, GNUWIN32 is useless
|
||||
else
|
||||
GNUWIN32_BASE=
|
||||
fi
|
||||
# Finally, sets automake conditional
|
||||
AM_CONDITIONAL(HAVE_GNUWIN32, test x$GNUWIN32_BASE != x)
|
||||
])
|
||||
|
||||
|
||||
|
||||
dnl ------------------------------------------------------------------
|
||||
dnl @synopsis AC_PATH_JPEG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
dnl Process option --with-jpeg.
|
||||
dnl Search JPEG along the extra
|
||||
dnl Define HAVE_JPEG.
|
||||
dnl Set output variable JPEG_CFLAGS and JPEG_LIBS
|
||||
dnl Designed by Leon. Unused at the moment.
|
||||
dnl ------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([AC_PATH_JPEG],
|
||||
[
|
||||
AC_ARG_VAR(JPEG_LIBS)
|
||||
AC_ARG_VAR(JPEG_CFLAGS)
|
||||
ac_jpeg=no
|
||||
AC_ARG_WITH(jpeg,
|
||||
AC_HELP_STRING([--with-jpeg=DIR],
|
||||
[where the IJG jpeg library is located]),
|
||||
[ac_jpeg=$withval], [ac_jpeg=yes] )
|
||||
# Process specification
|
||||
if test x$ac_jpeg = xyes ; then
|
||||
test x${JPEG_LIBS+set} != xset && JPEG_LIBS="-ljpeg"
|
||||
elif test x$ac_jpeg != xno ; then
|
||||
test x${JPEG_LIBS+set} != xset && JPEG_LIBS="-L$ac_jpeg -ljpeg"
|
||||
test x${JPEG_CFLAGS+set} != xset && JPEG_CFLAGS="-I$ac_jpeg"
|
||||
fi
|
||||
# Try linking
|
||||
if test x$ac_jpeg != xno ; then
|
||||
AC_MSG_CHECKING([for jpeg library])
|
||||
save_CFLAGS="$CFLAGS"
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $JPEG_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $JPEG_CFLAGS"
|
||||
LIBS="$LIBS $JPEG_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <jpeglib.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif ],[
|
||||
jpeg_CreateDecompress(0,0,0);],
|
||||
[ac_jpeg=yes], [ac_jpeg=no] )
|
||||
CFLAGS="$save_CFLAGS"
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
LIBS="$save_LIBS"
|
||||
AC_MSG_RESULT($ac_jpeg)
|
||||
fi
|
||||
# Finish
|
||||
if test x$ac_jpeg = xno; then
|
||||
JPEG_CFLAGS= ; JPEG_LIBS=
|
||||
ifelse([$2],,:,[$2])
|
||||
else
|
||||
AC_DEFINE(HAVE_JPEG,1,[Define if you have the IJG JPEG library.])
|
||||
AC_MSG_RESULT([setting JPEG_CFLAGS=$JPEG_CFLAGS])
|
||||
AC_MSG_RESULT([setting JPEG_LIBS=$JPEG_LIBS])
|
||||
ifelse([$1],,:,[$1])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl ------------------------------------------------------------------
|
||||
dnl @synopsis AC_PATH_LIBTIFF([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
dnl Process option --with-libtiff.
|
||||
dnl Search LIBTIFF along the extra
|
||||
dnl Define HAVE_LIBTIFF.
|
||||
dnl Set output variable LIBTIFF_CFLAGS and LIBTIFF_LIBS
|
||||
dnl -- inspired from previous AC_PATH_JPEG
|
||||
dnl ------------------------------------------------------------------
|
||||
AC_DEFUN([AC_PATH_LIBTIFF],
|
||||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
case $host in
|
||||
*msdos* | *go32* | *mingw32* | *cygwin* | *windows*)
|
||||
USING_WIN=yes
|
||||
;;
|
||||
*)
|
||||
USING_WIN=no
|
||||
esac
|
||||
AC_REQUIRE([AC_PATH_GNUWIN32])
|
||||
AC_ARG_VAR(LIBTIFF_LIBS,[Tiff library to link against])
|
||||
AC_ARG_VAR(LIBTIFF_CFLAGS,[Compile flags needed for TIFF support])
|
||||
ac_libtiff=no
|
||||
AC_ARG_WITH(libtiff,
|
||||
AC_HELP_STRING([--with-libtiff=DIR],
|
||||
[where the www.libtiff.org libtiff library is located]),
|
||||
[ac_libtiff=$withval], [ac_libtiff=yes] )
|
||||
AC_MSG_CHECKING([for Leffler libtiff library])
|
||||
# Need to define TOP_SRCDIR for the cases where the LIBTIFF library
|
||||
# is checked in with the code, at the top-level
|
||||
TOP_SRCDIR=`cd $srcdir; pwd`
|
||||
LOCAL_LIBTIFFDIR=$TOP_SRCDIR/libtiff
|
||||
# First of all, deal with the case when 'cl.exe' is used as compiler
|
||||
# indeed, when this is the case, we can only rely on finding
|
||||
# the right library and includes, but we can't try compiling
|
||||
# and linking. In addition, library needs to be specifically
|
||||
# supplied on the link line and special flags are needed...
|
||||
if test "x$CXX" = "xcl.exe" ; then
|
||||
if test "x$ac_libtiff" = "xyes" ; then
|
||||
# If LIBTIFF_LIBS has been set on configure command line
|
||||
# or as environment variable, just use it if it exists
|
||||
if test "x$LIBTIFF_LIBS" != "x" ; then
|
||||
AC_MSG_RESULT(user specified as $LIBTIFF_LIBS)
|
||||
if test "x$LIBTIFF_CFLAGS" = "x" ; then
|
||||
AC_MSG_WARN(LIBTIFF_CFLAGS is empty)
|
||||
fi
|
||||
fi
|
||||
# Otherwise, test if libtiff is at top level directory, under libtiff
|
||||
if test "x$LIBTIFF_LIBS" = "x" && test -r "$LOCAL_LIBTIFFDIR/lib/libtiff.a" && test -r "$LOCAL_LIBTIFFDIR/lib/libjpeg.a" && test -r "$LOCAL_LIBTIFFDIR/lib/libz.a" ; then
|
||||
AC_MSG_RESULT($LOCAL_LIBTIFFDIR/lib/libtiff.a)
|
||||
LIBTIFF_LIBS="$LOCAL_LIBTIFFDIR/lib/libtiff.a $LOCAL_LIBTIFFDIR/lib/libjpeg.a $LOCAL_LIBTIFFDIR/lib/libz.a user32.lib"
|
||||
LIBTIFF_CFLAGS="-I$LOCAL_LIBTIFFDIR/include"
|
||||
fi
|
||||
# Otherwise, if GnuWin32 was previously located
|
||||
if test "x$LIBTIFF_LIBS" = "x" && test -r "$GNUWIN32_BASE/lib/libtiff.a" && test -r "$GNUWIN32_BASE/lib/libjpeg.a" && test -r "$GNUWIN32_BASE/lib/libz.a" ; then
|
||||
AC_MSG_RESULT($GNUWIN32_BASE/lib/libtiff.a)
|
||||
AC_MSG_WARN($GNUWIN32_BASE/lib/libtiff.a version 3.5.7 works. Some versions like 3.6.1 do not!)
|
||||
LIBTIFF_LIBS="$GNUWIN32_BASE/lib/libtiff.a $GNUWIN32_BASE/lib/libjpeg.a $GNUWIN32_BASE/lib/libz.a user32.lib"
|
||||
fi
|
||||
if test "x$LIBTIFF_LIBS" = "x" ; then
|
||||
AC_MSG_RESULT(not found or incomplete)
|
||||
ac_libtiff=no
|
||||
fi
|
||||
elif test "x$ac_libtiff" != "xno" ; then
|
||||
test x${LIBTIFF_LIBS+set} != xset && LIBTIFF_LIBS="$ac_libtiff/libtiff"
|
||||
test x${LIBTIFF_CFLAGS+set} != xset && LIBTIFF_CFLAGS="-I$ac_libtiff"
|
||||
fi
|
||||
# If we are not using CL, that is we are either using gcc/cygwin
|
||||
# or we are not running under Windows:
|
||||
else
|
||||
# Process specification
|
||||
if test "x$ac_libtiff" = "xyes" ; then
|
||||
if test "x$LIBTIFF_LIBS" = "x" ; then
|
||||
# If local libtiff exists at top level, and we are running windows, use it first:
|
||||
if test "x$USING_WIN" = "xyes" && test -r "$LOCAL_LIBTIFFDIR/lib/libtiff.a" && test -r "$LOCAL_LIBTIFFDIR/lib/libjpeg.a" && test -r "$LOCAL_LIBTIFFDIR/lib/libz.a" ; then
|
||||
AC_MSG_RESULT($LOCAL_LIBTIFFDIR/lib/libtiff.a)
|
||||
LIBTIFF_LIBS="$LOCAL_LIBTIFFDIR/lib/libtiff.a $LOCAL_LIBTIFFDIR/lib/libjpeg.a $LOCAL_LIBTIFFDIR/lib/libz.a -lole32 -luuid -lwsock32"
|
||||
LIBTIFF_CFLAGS="-I$LOCAL_LIBTIFFDIR/include"
|
||||
fi
|
||||
# If GNUWIN32_BASE is defined, it means we are running under
|
||||
# Windows and we should use these builds if available because
|
||||
# they are the best bet
|
||||
if test "x$LIBTIFF_LIBS" = "x" && test "x$GNUWIN32_BASE" != "x" ; then
|
||||
# With version 3.5.7 of gnuwin32 libtiff, we do not need to link
|
||||
# against "$GNUWIN32_BASE/lib/libgw32c.a", so no need to test
|
||||
if test -r "$GNUWIN32_BASE/lib/libtiff.a" && test -r "$GNUWIN32_BASE/lib/libjpeg.a" && test -r "$GNUWIN32_BASE/lib/libz.a" ; then
|
||||
AC_MSG_RESULT($GNUWIN32_BASE/lib/libtiff.a)
|
||||
# With 3.5.7 version of libtiff, no need to add
|
||||
# $GNUWIN32_BASE/lib/libgw32c.a after $GNUWIN32_BASE/lib/libz.a
|
||||
LIBTIFF_LIBS="$GNUWIN32_BASE/lib/libtiff.a $GNUWIN32_BASE/lib/libjpeg.a $GNUWIN32_BASE/lib/libz.a -lole32 -luuid -lwsock32"
|
||||
else
|
||||
AC_MSG_RESULT([GNUWIN32 not found or incomplete. Trying something else])
|
||||
fi
|
||||
fi
|
||||
# If LIBTIFF_LIBS is still not defined after potentially going
|
||||
# the GNUWIN32 route, then try using home built versions
|
||||
if test "x$LIBTIFF_LIBS" = "x" ; then
|
||||
TIFF_PACKAGE="$HOME_UNIX/packages/libtiff/libtiff"
|
||||
if test -d "$TIFF_PACKAGE" ; then
|
||||
LIBTIFF_LIBS="$TIFF_PACKAGE/libtiff.a"
|
||||
LIBTIFF_CFLAGS="-I$TIFF_PACKAGE"
|
||||
else
|
||||
LIBTIFF_LIBS="-ltiff"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
elif test "x$ac_libtiff" != "xno" ; then
|
||||
test "x${LIBTIFF_LIBS+set}" != "xset" && LIBTIFF_LIBS="$ac_libtiff/libtiff.a"
|
||||
test "x${LIBTIFF_CFLAGS+set}" != "xset" && LIBTIFF_CFLAGS="-I$ac_libtiff"
|
||||
fi
|
||||
# Try linking - recall that -Wall is typically on, and any warning
|
||||
# will cause this test to fail... This, by the way, is one of the
|
||||
# reasons we cannot run this test when using the Microsoft compiler (cl),
|
||||
# which outputs tons of "garbage" on stdout:
|
||||
if test "x$ac_libtiff" != "xno" ; then
|
||||
AC_MSG_CHECKING([linking with $LIBTIFF_LIBS])
|
||||
save_CFLAGS="$CFLAGS"
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $LIBTIFF_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $LIBTIFF_CFLAGS"
|
||||
LIBS="$LIBS $LIBTIFF_LIBS -lm"
|
||||
AC_TRY_LINK([
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <tiffio.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif ],[
|
||||
TIFFClose((TIFF *) 0);],
|
||||
[ac_libtiff=ok],[ac_libtiff=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
LIBS="$save_LIBS"
|
||||
AC_MSG_RESULT($ac_libtiff)
|
||||
fi
|
||||
fi
|
||||
# Finish
|
||||
if test "x$ac_libtiff" = "xno"; then
|
||||
LIBTIFF_CFLAGS= ; LIBTIFF_LIBS=
|
||||
ifelse([$2],,:,[$2])
|
||||
else
|
||||
AC_DEFINE(HAVE_LIBTIFF,1,[Define if you have the www.libtiff.org LIBTIFF library.])
|
||||
AC_MSG_RESULT([setting LIBTIFF_CFLAGS=$LIBTIFF_CFLAGS])
|
||||
AC_MSG_RESULT([setting LIBTIFF_LIBS=$LIBTIFF_LIBS])
|
||||
CFLAGS="$LIBTIFF_CFLAGS $CFLAGS"
|
||||
CXXFLAGS="$LIBTIFF_CFLAGS $CXXFLAGS"
|
||||
if test "x$CXX" = "xcl.exe" ; then
|
||||
LIBS="$LIBTIFF_LIBS $LIBS"
|
||||
else
|
||||
LIBS="$LIBTIFF_LIBS $LIBS -lm"
|
||||
fi
|
||||
ifelse([$1],,:,[$1])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_LIBTIFF, test x$ac_libtiff != xno)
|
||||
])
|
@ -1,734 +0,0 @@
|
||||
##### http://autoconf-archive.cryp.to/ax_create_stdint_h.html
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
|
||||
# existence of an include file <stdint.h> that defines a set of
|
||||
# typedefs, especially uint8_t,int32_t,uintptr_t. Many older
|
||||
# installations will not provide this file, but some will have the
|
||||
# very same definitions in <inttypes.h>. In other enviroments we can
|
||||
# use the inet-types in <sys/types.h> which would define the typedefs
|
||||
# int8_t and u_int8_t respectivly.
|
||||
#
|
||||
# This macros will create a local "_stdint.h" or the headerfile given
|
||||
# as an argument. In many cases that file will just "#include
|
||||
# <stdint.h>" or "#include <inttypes.h>", while in other environments
|
||||
# it will provide the set of basic 'stdint's definitions/typedefs:
|
||||
#
|
||||
# int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
|
||||
# int_least32_t.. int_fast32_t.. intmax_t
|
||||
#
|
||||
# which may or may not rely on the definitions of other files, or
|
||||
# using the AC_CHECK_SIZEOF macro to determine the actual sizeof each
|
||||
# type.
|
||||
#
|
||||
# if your header files require the stdint-types you will want to
|
||||
# create an installable file mylib-int.h that all your other
|
||||
# installable header may include. So if you have a library package
|
||||
# named "mylib", just use
|
||||
#
|
||||
# AX_CREATE_STDINT_H(mylib-int.h)
|
||||
#
|
||||
# in configure.ac and go to install that very header file in
|
||||
# Makefile.am along with the other headers (mylib.h) - and the
|
||||
# mylib-specific headers can simply use "#include <mylib-int.h>" to
|
||||
# obtain the stdint-types.
|
||||
#
|
||||
# Remember, if the system already had a valid <stdint.h>, the
|
||||
# generated file will include it directly. No need for fuzzy
|
||||
# HAVE_STDINT_H things... (oops, GCC 4.2.x has deliberatly disabled
|
||||
# its stdint.h for non-c99 compilation and the c99-mode is not the
|
||||
# default. Therefore this macro will not use the compiler's stdint.h
|
||||
# - please complain to the GCC developers).
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2006-10-13
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
|
||||
#
|
||||
# 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, the respective Autoconf Macro's copyright
|
||||
# owner gives unlimited permission to copy, distribute and modify the
|
||||
# configure scripts that are the output of Autoconf when processing
|
||||
# the Macro. You need not follow the terms of the GNU General Public
|
||||
# License when using or distributing such scripts, even though
|
||||
# portions of the text of the Macro appear in them. The GNU General
|
||||
# Public License (GPL) does govern all other use of the material that
|
||||
# constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the
|
||||
# Autoconf Macro released by the Autoconf Macro Archive. When you
|
||||
# make and distribute a modified version of the Autoconf Macro, you
|
||||
# may extend this special exception to the GPL to apply to your
|
||||
# modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CHECK_DATA_MODEL],[
|
||||
AC_CHECK_SIZEOF(char)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(void*)
|
||||
ac_cv_char_data_model=""
|
||||
ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char"
|
||||
ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short"
|
||||
ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int"
|
||||
ac_cv_long_data_model=""
|
||||
ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int"
|
||||
ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long"
|
||||
ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp"
|
||||
AC_MSG_CHECKING([data model])
|
||||
case "$ac_cv_char_data_model/$ac_cv_long_data_model" in
|
||||
122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;;
|
||||
122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;;
|
||||
122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;;
|
||||
124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;;
|
||||
124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;;
|
||||
124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;;
|
||||
124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;;
|
||||
128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;;
|
||||
128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;;
|
||||
222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;;
|
||||
333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;;
|
||||
444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;;
|
||||
666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;;
|
||||
888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;;
|
||||
222/*|333/*|444/*|666/*|888/*) :
|
||||
ac_cv_data_model="iDSP" ; n="unusual dsptype" ;;
|
||||
*) ac_cv_data_model="none" ; n="very unusual model" ;;
|
||||
esac
|
||||
AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)])
|
||||
])
|
||||
|
||||
dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF])
|
||||
AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[
|
||||
AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[
|
||||
ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
|
||||
AC_MSG_RESULT([(..)])
|
||||
for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h])
|
||||
do
|
||||
unset ac_cv_type_uintptr_t
|
||||
unset ac_cv_type_uint64_t
|
||||
AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>])
|
||||
AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
|
||||
m4_ifvaln([$1],[$1]) break
|
||||
done
|
||||
AC_MSG_CHECKING([for stdint uintptr_t])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[
|
||||
AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[
|
||||
ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
|
||||
AC_MSG_RESULT([(..)])
|
||||
for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h])
|
||||
do
|
||||
unset ac_cv_type_uint32_t
|
||||
unset ac_cv_type_uint64_t
|
||||
AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>])
|
||||
AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
|
||||
m4_ifvaln([$1],[$1]) break
|
||||
break;
|
||||
done
|
||||
AC_MSG_CHECKING([for stdint uint32_t])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[
|
||||
AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[
|
||||
ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
|
||||
AC_MSG_RESULT([(..)])
|
||||
for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do
|
||||
unset ac_cv_type_u_int32_t
|
||||
unset ac_cv_type_u_int64_t
|
||||
AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>])
|
||||
AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>])
|
||||
m4_ifvaln([$1],[$1]) break
|
||||
break;
|
||||
done
|
||||
AC_MSG_CHECKING([for stdint u_int32_t])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_CREATE_STDINT_H],
|
||||
[# ------ AX CREATE STDINT H -------------------------------------
|
||||
AC_MSG_CHECKING([for stdint types])
|
||||
ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
|
||||
# try to shortcircuit - if the default include path of the compiler
|
||||
# can find a "stdint.h" header then we assume that all compilers can.
|
||||
AC_CACHE_VAL([ac_cv_header_stdint_t],[
|
||||
old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
|
||||
old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
|
||||
old_CFLAGS="$CFLAGS" ; CFLAGS=""
|
||||
AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
|
||||
[ac_cv_stdint_result="(assuming C99 compatible system)"
|
||||
ac_cv_header_stdint_t="stdint.h"; ],
|
||||
[ac_cv_header_stdint_t=""])
|
||||
if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then
|
||||
CFLAGS="-std=c99"
|
||||
AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
|
||||
[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)])
|
||||
fi
|
||||
CXXFLAGS="$old_CXXFLAGS"
|
||||
CPPFLAGS="$old_CPPFLAGS"
|
||||
CFLAGS="$old_CFLAGS" ])
|
||||
|
||||
v="... $ac_cv_header_stdint_h"
|
||||
if test "$ac_stdint_h" = "stdint.h" ; then
|
||||
AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)])
|
||||
elif test "$ac_stdint_h" = "inttypes.h" ; then
|
||||
AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)])
|
||||
elif test "_$ac_cv_header_stdint_t" = "_" ; then
|
||||
AC_MSG_RESULT([(putting them into $ac_stdint_h)$v])
|
||||
else
|
||||
ac_cv_header_stdint="$ac_cv_header_stdint_t"
|
||||
AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)])
|
||||
fi
|
||||
|
||||
if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
|
||||
|
||||
dnl .....intro message done, now do a few system checks.....
|
||||
dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type,
|
||||
dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW
|
||||
dnl instead that is triggered with 3 or more arguments (see types.m4)
|
||||
|
||||
inttype_headers=`echo $2 | sed -e 's/,/ /g'`
|
||||
|
||||
ac_cv_stdint_result="(no helpful system typedefs seen)"
|
||||
AX_CHECK_HEADER_STDINT_X(dnl
|
||||
stdint.h inttypes.h sys/inttypes.h $inttype_headers,
|
||||
ac_cv_stdint_result="(seen uintptr_t$and64 in $i)")
|
||||
|
||||
if test "_$ac_cv_header_stdint_x" = "_" ; then
|
||||
AX_CHECK_HEADER_STDINT_O(dnl,
|
||||
inttypes.h sys/inttypes.h stdint.h $inttype_headers,
|
||||
ac_cv_stdint_result="(seen uint32_t$and64 in $i)")
|
||||
fi
|
||||
|
||||
if test "_$ac_cv_header_stdint_x" = "_" ; then
|
||||
if test "_$ac_cv_header_stdint_o" = "_" ; then
|
||||
AX_CHECK_HEADER_STDINT_U(dnl,
|
||||
sys/types.h inttypes.h sys/inttypes.h $inttype_headers,
|
||||
ac_cv_stdint_result="(seen u_int32_t$and64 in $i)")
|
||||
fi fi
|
||||
|
||||
dnl if there was no good C99 header file, do some typedef checks...
|
||||
if test "_$ac_cv_header_stdint_x" = "_" ; then
|
||||
AC_MSG_CHECKING([for stdint datatype model])
|
||||
AC_MSG_RESULT([(..)])
|
||||
AX_CHECK_DATA_MODEL
|
||||
fi
|
||||
|
||||
if test "_$ac_cv_header_stdint_x" != "_" ; then
|
||||
ac_cv_header_stdint="$ac_cv_header_stdint_x"
|
||||
elif test "_$ac_cv_header_stdint_o" != "_" ; then
|
||||
ac_cv_header_stdint="$ac_cv_header_stdint_o"
|
||||
elif test "_$ac_cv_header_stdint_u" != "_" ; then
|
||||
ac_cv_header_stdint="$ac_cv_header_stdint_u"
|
||||
else
|
||||
ac_cv_header_stdint="stddef.h"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for extra inttypes in chosen header])
|
||||
AC_MSG_RESULT([($ac_cv_header_stdint)])
|
||||
dnl see if int_least and int_fast types are present in _this_ header.
|
||||
unset ac_cv_type_int_least32_t
|
||||
unset ac_cv_type_int_fast32_t
|
||||
AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
|
||||
AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
|
||||
AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
|
||||
|
||||
fi # shortcircut to system "stdint.h"
|
||||
# ------------------ PREPARE VARIABLES ------------------------------
|
||||
if test "$GCC" = "yes" ; then
|
||||
ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
|
||||
else
|
||||
ac_cv_stdint_message="using $CC"
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl
|
||||
$ac_cv_stdint_result])
|
||||
|
||||
dnl -----------------------------------------------------------------
|
||||
# ----------------- DONE inttypes.h checks START header -------------
|
||||
AC_CONFIG_COMMANDS([$ac_stdint_h],[
|
||||
AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h)
|
||||
ac_stdint=$tmp/_stdint.h
|
||||
|
||||
echo "#ifndef" $_ac_stdint_h >$ac_stdint
|
||||
echo "#define" $_ac_stdint_h "1" >>$ac_stdint
|
||||
echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint
|
||||
echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint
|
||||
echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint
|
||||
if test "_$ac_cv_header_stdint_t" != "_" ; then
|
||||
echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint
|
||||
echo "#include <stdint.h>" >>$ac_stdint
|
||||
echo "#endif" >>$ac_stdint
|
||||
echo "#endif" >>$ac_stdint
|
||||
else
|
||||
|
||||
cat >>$ac_stdint <<STDINT_EOF
|
||||
|
||||
/* ................... shortcircuit part ........................... */
|
||||
|
||||
#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <stddef.h>
|
||||
|
||||
/* .................... configured part ............................ */
|
||||
|
||||
STDINT_EOF
|
||||
|
||||
echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint
|
||||
if test "_$ac_cv_header_stdint_x" != "_" ; then
|
||||
ac_header="$ac_cv_header_stdint_x"
|
||||
echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint
|
||||
else
|
||||
echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint
|
||||
fi
|
||||
|
||||
echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint
|
||||
if test "_$ac_cv_header_stdint_o" != "_" ; then
|
||||
ac_header="$ac_cv_header_stdint_o"
|
||||
echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint
|
||||
else
|
||||
echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint
|
||||
fi
|
||||
|
||||
echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint
|
||||
if test "_$ac_cv_header_stdint_u" != "_" ; then
|
||||
ac_header="$ac_cv_header_stdint_u"
|
||||
echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint
|
||||
else
|
||||
echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint
|
||||
fi
|
||||
|
||||
echo "" >>$ac_stdint
|
||||
|
||||
if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then
|
||||
echo "#include <$ac_header>" >>$ac_stdint
|
||||
echo "" >>$ac_stdint
|
||||
fi fi
|
||||
|
||||
echo "/* which 64bit typedef has been found */" >>$ac_stdint
|
||||
if test "$ac_cv_type_uint64_t" = "yes" ; then
|
||||
echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint
|
||||
else
|
||||
echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint
|
||||
fi
|
||||
if test "$ac_cv_type_u_int64_t" = "yes" ; then
|
||||
echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint
|
||||
else
|
||||
echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint
|
||||
fi
|
||||
echo "" >>$ac_stdint
|
||||
|
||||
echo "/* which type model has been detected */" >>$ac_stdint
|
||||
if test "_$ac_cv_char_data_model" != "_" ; then
|
||||
echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint
|
||||
echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint
|
||||
else
|
||||
echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint
|
||||
echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint
|
||||
fi
|
||||
echo "" >>$ac_stdint
|
||||
|
||||
echo "/* whether int_least types were detected */" >>$ac_stdint
|
||||
if test "$ac_cv_type_int_least32_t" = "yes"; then
|
||||
echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint
|
||||
else
|
||||
echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint
|
||||
fi
|
||||
echo "/* whether int_fast types were detected */" >>$ac_stdint
|
||||
if test "$ac_cv_type_int_fast32_t" = "yes"; then
|
||||
echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint
|
||||
else
|
||||
echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint
|
||||
fi
|
||||
echo "/* whether intmax_t type was detected */" >>$ac_stdint
|
||||
if test "$ac_cv_type_intmax_t" = "yes"; then
|
||||
echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint
|
||||
else
|
||||
echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint
|
||||
fi
|
||||
echo "" >>$ac_stdint
|
||||
|
||||
cat >>$ac_stdint <<STDINT_EOF
|
||||
/* .................... detections part ............................ */
|
||||
|
||||
/* whether we need to define bitspecific types from compiler base types */
|
||||
#ifndef _STDINT_HEADER_INTPTR
|
||||
#ifndef _STDINT_HEADER_UINT32
|
||||
#ifndef _STDINT_HEADER_U_INT32
|
||||
#define _STDINT_NEED_INT_MODEL_T
|
||||
#else
|
||||
#define _STDINT_HAVE_U_INT_TYPES
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _STDINT_HAVE_U_INT_TYPES
|
||||
#undef _STDINT_NEED_INT_MODEL_T
|
||||
#endif
|
||||
|
||||
#ifdef _STDINT_CHAR_MODEL
|
||||
#if _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
|
||||
#ifndef _STDINT_BYTE_MODEL
|
||||
#define _STDINT_BYTE_MODEL 12
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _STDINT_HAVE_INT_LEAST32_T
|
||||
#define _STDINT_NEED_INT_LEAST_T
|
||||
#endif
|
||||
|
||||
#ifndef _STDINT_HAVE_INT_FAST32_T
|
||||
#define _STDINT_NEED_INT_FAST_T
|
||||
#endif
|
||||
|
||||
#ifndef _STDINT_HEADER_INTPTR
|
||||
#define _STDINT_NEED_INTPTR_T
|
||||
#ifndef _STDINT_HAVE_INTMAX_T
|
||||
#define _STDINT_NEED_INTMAX_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* .................... definition part ............................ */
|
||||
|
||||
/* some system headers have good uint64_t */
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#if defined _STDINT_HAVE_UINT64_T || defined HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
#elif defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef u_int64_t uint64_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _HAVE_UINT64_T
|
||||
/* .. here are some common heuristics using compiler runtime specifics */
|
||||
#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L
|
||||
#define _HAVE_UINT64_T
|
||||
#define _HAVE_LONGLONG_UINT64_T
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
|
||||
#elif !defined __STRICT_ANSI__
|
||||
#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
|
||||
#define _HAVE_UINT64_T
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
|
||||
#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
|
||||
/* note: all ELF-systems seem to have loff-support which needs 64-bit */
|
||||
#if !defined _NO_LONGLONG
|
||||
#define _HAVE_UINT64_T
|
||||
#define _HAVE_LONGLONG_UINT64_T
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#endif
|
||||
|
||||
#elif defined __alpha || (defined __mips && defined _ABIN32)
|
||||
#if !defined _NO_LONGLONG
|
||||
typedef long int64_t;
|
||||
typedef unsigned long uint64_t;
|
||||
#endif
|
||||
/* compiler/cpu type to define int64_t */
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined _STDINT_HAVE_U_INT_TYPES
|
||||
/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
|
||||
typedef u_int8_t uint8_t;
|
||||
typedef u_int16_t uint16_t;
|
||||
typedef u_int32_t uint32_t;
|
||||
|
||||
/* glibc compatibility */
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _STDINT_NEED_INT_MODEL_T
|
||||
/* we must guess all the basic types. Apart from byte-adressable system, */
|
||||
/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
|
||||
/* (btw, those nibble-addressable systems are way off, or so we assume) */
|
||||
|
||||
dnl /* have a look at "64bit and data size neutrality" at */
|
||||
dnl /* http://unix.org/version2/whatsnew/login_64bit.html */
|
||||
dnl /* (the shorthand "ILP" types always have a "P" part) */
|
||||
|
||||
#if defined _STDINT_BYTE_MODEL
|
||||
#if _STDINT_LONG_MODEL+0 == 242
|
||||
/* 2:4:2 = IP16 = a normal 16-bit system */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned long uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef long int32_t;
|
||||
#endif
|
||||
#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444
|
||||
/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */
|
||||
/* 4:4:4 = ILP32 = a normal 32-bit system */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488
|
||||
/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */
|
||||
/* 4:8:8 = LP64 = a normal 64-bit system */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
/* this system has a "long" of 64bit */
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
typedef unsigned long uint64_t;
|
||||
typedef long int64_t;
|
||||
#endif
|
||||
#elif _STDINT_LONG_MODEL+0 == 448
|
||||
/* LLP64 a 64-bit system derived from a 32-bit system */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#ifndef __int8_t_defined
|
||||
#define __int8_t_defined
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
/* assuming the system has a "long long" */
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
#define _HAVE_LONGLONG_UINT64_T
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef long long int64_t;
|
||||
#endif
|
||||
#else
|
||||
#define _STDINT_NO_INT32_T
|
||||
#endif
|
||||
#else
|
||||
#define _STDINT_NO_INT8_T
|
||||
#define _STDINT_NO_INT32_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* quote from SunOS-5.8 sys/inttypes.h:
|
||||
* Use at your own risk. As of February 1996, the committee is squarely
|
||||
* behind the fixed sized types; the "least" and "fast" types are still being
|
||||
* discussed. The probability that the "fast" types may be removed before
|
||||
* the standard is finalized is high enough that they are not currently
|
||||
* implemented.
|
||||
*/
|
||||
|
||||
#if defined _STDINT_NEED_INT_LEAST_T
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int32_t int_least32_t;
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef int64_t int_least64_t;
|
||||
#endif
|
||||
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef uint64_t uint_least64_t;
|
||||
#endif
|
||||
/* least types */
|
||||
#endif
|
||||
|
||||
#if defined _STDINT_NEED_INT_FAST_T
|
||||
typedef int8_t int_fast8_t;
|
||||
typedef int int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef int64_t int_fast64_t;
|
||||
#endif
|
||||
|
||||
typedef uint8_t uint_fast8_t;
|
||||
typedef unsigned uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef uint64_t uint_fast64_t;
|
||||
#endif
|
||||
/* fast types */
|
||||
#endif
|
||||
|
||||
#ifdef _STDINT_NEED_INTMAX_T
|
||||
#ifdef _HAVE_UINT64_T
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
#else
|
||||
typedef long intmax_t;
|
||||
typedef unsigned long uintmax_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _STDINT_NEED_INTPTR_T
|
||||
#ifndef __intptr_t_defined
|
||||
#define __intptr_t_defined
|
||||
/* we encourage using "long" to store pointer values, never use "int" ! */
|
||||
#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484
|
||||
typedef unsigned int uintptr_t;
|
||||
typedef int intptr_t;
|
||||
#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444
|
||||
typedef unsigned long uintptr_t;
|
||||
typedef long intptr_t;
|
||||
#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T
|
||||
typedef uint64_t uintptr_t;
|
||||
typedef int64_t intptr_t;
|
||||
#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */
|
||||
typedef unsigned long uintptr_t;
|
||||
typedef long intptr_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* The ISO C99 standard specifies that in C++ implementations these
|
||||
should only be defined if explicitly requested. */
|
||||
#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
|
||||
#ifndef UINT32_C
|
||||
|
||||
/* Signed. */
|
||||
# define INT8_C(c) c
|
||||
# define INT16_C(c) c
|
||||
# define INT32_C(c) c
|
||||
# ifdef _HAVE_LONGLONG_UINT64_T
|
||||
# define INT64_C(c) c ## L
|
||||
# else
|
||||
# define INT64_C(c) c ## LL
|
||||
# endif
|
||||
|
||||
/* Unsigned. */
|
||||
# define UINT8_C(c) c ## U
|
||||
# define UINT16_C(c) c ## U
|
||||
# define UINT32_C(c) c ## U
|
||||
# ifdef _HAVE_LONGLONG_UINT64_T
|
||||
# define UINT64_C(c) c ## UL
|
||||
# else
|
||||
# define UINT64_C(c) c ## ULL
|
||||
# endif
|
||||
|
||||
/* Maximal type. */
|
||||
# ifdef _HAVE_LONGLONG_UINT64_T
|
||||
# define INTMAX_C(c) c ## L
|
||||
# define UINTMAX_C(c) c ## UL
|
||||
# else
|
||||
# define INTMAX_C(c) c ## LL
|
||||
# define UINTMAX_C(c) c ## ULL
|
||||
# endif
|
||||
|
||||
/* literalnumbers */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* These limits are merily those of a two complement byte-oriented system */
|
||||
|
||||
/* Minimum of signed integral types. */
|
||||
# define INT8_MIN (-128)
|
||||
# define INT16_MIN (-32767-1)
|
||||
# define INT32_MIN (-2147483647-1)
|
||||
# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
|
||||
/* Maximum of signed integral types. */
|
||||
# define INT8_MAX (127)
|
||||
# define INT16_MAX (32767)
|
||||
# define INT32_MAX (2147483647)
|
||||
# define INT64_MAX (__INT64_C(9223372036854775807))
|
||||
|
||||
/* Maximum of unsigned integral types. */
|
||||
# define UINT8_MAX (255)
|
||||
# define UINT16_MAX (65535)
|
||||
# define UINT32_MAX (4294967295U)
|
||||
# define UINT64_MAX (__UINT64_C(18446744073709551615))
|
||||
|
||||
/* Minimum of signed integral types having a minimum size. */
|
||||
# define INT_LEAST8_MIN INT8_MIN
|
||||
# define INT_LEAST16_MIN INT16_MIN
|
||||
# define INT_LEAST32_MIN INT32_MIN
|
||||
# define INT_LEAST64_MIN INT64_MIN
|
||||
/* Maximum of signed integral types having a minimum size. */
|
||||
# define INT_LEAST8_MAX INT8_MAX
|
||||
# define INT_LEAST16_MAX INT16_MAX
|
||||
# define INT_LEAST32_MAX INT32_MAX
|
||||
# define INT_LEAST64_MAX INT64_MAX
|
||||
|
||||
/* Maximum of unsigned integral types having a minimum size. */
|
||||
# define UINT_LEAST8_MAX UINT8_MAX
|
||||
# define UINT_LEAST16_MAX UINT16_MAX
|
||||
# define UINT_LEAST32_MAX UINT32_MAX
|
||||
# define UINT_LEAST64_MAX UINT64_MAX
|
||||
|
||||
/* shortcircuit*/
|
||||
#endif
|
||||
/* once */
|
||||
#endif
|
||||
#endif
|
||||
STDINT_EOF
|
||||
fi
|
||||
if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then
|
||||
AC_MSG_NOTICE([$ac_stdint_h is unchanged])
|
||||
else
|
||||
ac_dir=`AS_DIRNAME(["$ac_stdint_h"])`
|
||||
AS_MKDIR_P(["$ac_dir"])
|
||||
rm -f $ac_stdint_h
|
||||
mv $ac_stdint $ac_stdint_h
|
||||
fi
|
||||
],[# variables for create stdint.h replacement
|
||||
PACKAGE="$PACKAGE"
|
||||
VERSION="$VERSION"
|
||||
ac_stdint_h="$ac_stdint_h"
|
||||
_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h)
|
||||
ac_cv_stdint_message="$ac_cv_stdint_message"
|
||||
ac_cv_header_stdint_t="$ac_cv_header_stdint_t"
|
||||
ac_cv_header_stdint_x="$ac_cv_header_stdint_x"
|
||||
ac_cv_header_stdint_o="$ac_cv_header_stdint_o"
|
||||
ac_cv_header_stdint_u="$ac_cv_header_stdint_u"
|
||||
ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
|
||||
ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
|
||||
ac_cv_char_data_model="$ac_cv_char_data_model"
|
||||
ac_cv_long_data_model="$ac_cv_long_data_model"
|
||||
ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
|
||||
ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
|
||||
ac_cv_type_intmax_t="$ac_cv_type_intmax_t"
|
||||
])
|
||||
])
|
1317
config/config.guess
vendored
1317
config/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1411
config/config.sub
vendored
1411
config/config.sub
vendored
File diff suppressed because it is too large
Load Diff
423
config/depcomp
423
config/depcomp
@ -1,423 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 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., 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.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
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
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
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.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
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. 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.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
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,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$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"
|
||||
;;
|
||||
|
||||
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
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab 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 proprocessed 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'. We will use -o /dev/null later,
|
||||
# however we can't do the remplacement now because
|
||||
# `-o $object' might simply not be used
|
||||
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
|
||||
"$@" -o /dev/null $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 $?
|
||||
# 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 ;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
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 proprocessed 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 '/^# [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 proprocessed 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
|
@ -1,251 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# 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. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$src" ] || [ -d "$src" ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# 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 $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
336
config/missing
336
config/missing
@ -1,336 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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., 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.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# 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
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-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'
|
||||
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]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. 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)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. 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)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. 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*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. 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)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
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' is missing on your system. 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 [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. 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 [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. 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 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. 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."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 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 you do not seem to have it handy on your
|
||||
system. 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 prerequirements 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
|
@ -1,99 +0,0 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi ;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 3
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
15
configure.ac
15
configure.ac
@ -188,7 +188,7 @@ AC_PROG_RANLIB
|
||||
|
||||
|
||||
# Test for GNUWIN32 tools (only useful under windows)
|
||||
AC_PATH_GNUWIN32
|
||||
# AC_PATH_GNUWIN32
|
||||
|
||||
# ----------------------------------------
|
||||
# C++ related options
|
||||
@ -200,12 +200,11 @@ AC_LANG_CPLUSPLUS
|
||||
# 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
|
||||
# AC_CXX_OPTIMIZE
|
||||
# AC_CXX_BOOL
|
||||
# AC_CXX_TYPENAME
|
||||
# AC_CXX_STDINCLUDES
|
||||
# AC_CXX_RPO
|
||||
|
||||
# ----------------------------------------
|
||||
# Check for libraries
|
||||
@ -279,7 +278,7 @@ AC_PATH_LIBTIFF(,
|
||||
# ----------------------------------------
|
||||
|
||||
# Define installation paths
|
||||
AC_DEFINE_INSTALL_PATHS
|
||||
# AC_DEFINE_INSTALL_PATHS
|
||||
# Redundant with PACKAGE_VERSION - comment out
|
||||
# AC_DEFINE_UNQUOTED(TESSERACT_VERSION,["${PACKAGE_VERSION}"],[version string])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user