dnsmasq: stay close as possible to master branch
[tomato.git] / release / src-rt-6.x.4708 / router / lzo / configure.ac
blob4dee7f052b96d3c2b4da163fe0b82f5415eec9f3
2 #  configure.ac -- autoconf configuration for the LZO library
4 #  This file is part of the LZO data compression library.
6 #  Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
7 #  All Rights Reserved.
9 #  The LZO library is free software; you can redistribute it and/or
10 #  modify it under the terms of the GNU General Public License as
11 #  published by the Free Software Foundation; either version 2 of
12 #  the License, or (at your option) any later version.
14 #  The LZO library is distributed in the hope that it will be useful,
15 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 #  GNU General Public License for more details.
19 #  You should have received a copy of the GNU General Public License
20 #  along with the LZO library; see the file COPYING.
21 #  If not, write to the Free Software Foundation, Inc.,
22 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #  Markus F.X.J. Oberhumer
25 #  <markus@oberhumer.com>
26 #  http://www.oberhumer.com/opensource/lzo/
30 # /***********************************************************************
31 # // Init
32 # ************************************************************************/
34 AC_COPYRIGHT([Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer.
35 All Rights Reserved.
36 This configure script may be copied, distributed and modified under the
37 terms of the GNU General Public License; see COPYING for more details.])
39 AC_PREREQ(2.69)
40 AC_INIT([LZO],[2.09],[markus@oberhumer.com],[lzo],[http://www.oberhumer.com/opensource/lzo/])
41 AC_MSG_NOTICE([Configuring LZO $PACKAGE_VERSION])
42 AC_CONFIG_SRCDIR(src/lzo_init.c)
43 AC_CONFIG_AUX_DIR(autoconf)
44 m4_include([autoconf/local.m4])
45 AC_PREFIX_DEFAULT(/usr/local)
46 AC_CANONICAL_BUILD
47 AC_CANONICAL_HOST
48 AC_CANONICAL_TARGET
49 AM_MAINTAINER_MODE
51 if test -z "$ac_abs_top_srcdir"; then
52     _AC_SRCDIRS([.])
54 if test -z "$ac_abs_top_srcdir"; then
55     as_fn_error 1 "internal error: ac_abs_top_srcdir is not set"
57 if test -r .Conf.settings1; then
58     . ./.Conf.settings1
61 AC_PROG_CC
62 AM_PROG_CC_C_O
63 AM_PROG_AR
64 AM_PROG_AS
65 AC_PROG_CPP
66 mfx_PROG_CPPFLAGS
67 AC_C_CONST
68 mfx_LZO_CHECK_ENDIAN
69 AC_SYS_LARGEFILE
71 AM_INIT_AUTOMAKE([1.15 gnu subdir-objects -Wall -Werror])
72 AM_SILENT_RULES([yes])
73 AC_CONFIG_HEADERS([config.h:config.hin])
74 AH_TOP([#ifndef __LZO_AUTOCONF_CONFIG_H_INCLUDED
75 #define __LZO_AUTOCONF_CONFIG_H_INCLUDED 1])
76 AH_BOTTOM([#endif /* already included */])
78 AC_ENABLE_STATIC
79 AC_DISABLE_SHARED
80 LT_INIT
83 # /***********************************************************************
84 # // Checks for header files
85 # ************************************************************************/
87 mfx_ACC_CHECK_HEADERS
88 dnl AC_CHECK_HEADERS([sys/param.h sys/resource.h sys/times.h])
89 if test "X$ac_cv_header_limits_h" != Xyes; then
90     AC_MSG_ERROR([<limits.h> header not found])
92 mfx_CHECK_HEADER_SANE_LIMITS_H
93 if test "X$mfx_cv_header_sane_limits_h" != Xyes; then
94     AC_MSG_ERROR([your <limits.h> header is broken - for details see config.log])
98 # /***********************************************************************
99 # // Checks for typedefs and structures
100 # ************************************************************************/
102 AC_TYPE_OFF_T
103 AC_CHECK_TYPE(ptrdiff_t,long)
104 AC_TYPE_SIZE_T
105 AC_TYPE_SIGNAL
107 mfx_ACC_CHECK_SIZEOF
108 mfx_CHECK_SIZEOF
111 # /***********************************************************************
112 # // Checks for library functions
113 # ************************************************************************/
115 mfx_ACC_CHECK_FUNCS
116 mfx_CHECK_LIB_WINMM
119 # /***********************************************************************
120 # // Checks for assembler
121 # ************************************************************************/
123 AC_ARG_ENABLE(asm, AS_HELP_STRING(--disable-asm,disable assembly versions))
125 asm_arch=
126 asm_dir=
127 asm_msg_amd64=no
128 asm_msg_i386=no
130 case "$host_cpu-$ac_cv_sizeof_void_p" in
131     amd64-8 | x86_64-8) asm_arch="amd64"; asm_dir="asm/amd64/src_gas/elf64"; asm_mode="amd64_src_gas_elf64" ;;
132     i?86-4) asm_arch="i386"; asm_dir="asm/i386/src_gas"; asm_mode="i386_src_gas" ;;
133     *) enable_asm=no ;;
134 esac
135 LZO_USE_ASM_i386_src_gas=no
137 AC_MSG_CHECKING([whether to build assembly versions])
138 if test "X$enable_asm" != Xno; then
139 mfx_compile_S='${CCAS} ${CCASFLAGS} -c conftest.S 1>&AS_MESSAGE_LOG_FD'
140 cat > conftest.S <<EOF
141 #if !defined(__i386__) && !defined(__i386)
142 #error
143 this+is+an+error
144 #endif
145 #include "$ac_abs_top_srcdir/$asm_dir/lzo1x_f1.S"
147 enable_asm=no
148 if AC_TRY_EVAL(mfx_compile_S); then
149     if AC_TRY_COMMAND([test -s conftest.$ac_objext]); then
150         enable_asm=yes
151         eval asm_msg_$asm_arch="'yes [[$asm_dir]]'"
152         eval LZO_USE_ASM_$asm_mode=yes
153     fi
155 if test "X$enable_asm" = Xno; then
156     echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
157     cat conftest.S >&AS_MESSAGE_LOG_FD
159 rm -rf conftest*
161 AC_MSG_RESULT([$enable_asm])
163 AM_CONDITIONAL(LZO_USE_ASM_i386_src_gas, [test "X$LZO_USE_ASM_i386_src_gas" != Xno])
164 AM_CONDITIONAL(LZO_USE_ASM_i386_obj_elf32, [false])
167 # /***********************************************************************
168 # // Write output files
169 # ************************************************************************/
171 mfx_LZO_LZOCHK(["-I$srcdir/include -I$srcdir"],[#include <lzo/lzoconf.h>],[<src/lzo_supp.h>])
173 if test -r .Conf.settings2; then
174     . ./.Conf.settings2
177 my_DEFS="-DLZO_HAVE_CONFIG_H=1"
178 if test "X$enable_asm" != Xno; then
179     my_DEFS="$my_DEFS -DLZO_USE_ASM=1"
182 AC_CONFIG_COMMANDS_PRE([
183     test "X$DEFS" = "X-DHAVE_CONFIG_H" && DEFS=
184     test "X$DEFS" != "X" && DEFS="$DEFS "
185     DEFS="${DEFS}${my_DEFS}"
187 AC_CONFIG_FILES([Makefile])
188 AC_OUTPUT
191 ##   enable AMD64 assembly code : ${asm_msg_amd64}
192 cat <<EOF
194    LZO configuration summary
195    -------------------------
196    LZO version                : ${PACKAGE_VERSION}
197    configured for host        : ${host_cpu}-${host_vendor}-${host_os}
198    source code location       : ${srcdir}
199    compiler                   : ${CC}
200    preprocessor definitions   : ${DEFS}
201    preprocessor flags         : ${CPPFLAGS}
202    compiler flags             : ${CFLAGS}
203    build static library       : ${enable_static}
204    build shared library       : ${enable_shared}
205    enable i386 assembly code  : ${asm_msg_i386}
208    LZO ${PACKAGE_VERSION} configured.
210    Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
211    All Rights Reserved.
213    The LZO library is free software; you can redistribute it and/or
214    modify it under the terms of the GNU General Public License as
215    published by the Free Software Foundation; either version 2 of
216    the License, or (at your option) any later version.
218    The LZO library is distributed in the hope that it will be useful,
219    but WITHOUT ANY WARRANTY; without even the implied warranty of
220    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
221    GNU General Public License for more details.
223    Markus F.X.J. Oberhumer
224    <markus@oberhumer.com>
225    http://www.oberhumer.com/opensource/lzo/
228 Type 'make' to build LZO.
229 Type 'make check' and 'make test' to test LZO.
230 Type 'make install' to install LZO.
231 After installing LZO, please have a look at 'examples/simple.c'.
235 # vim:set ts=4 sw=4 et: