2 # configure.ac -- autoconf configuration for the lzop package
4 # This file is part of the lzop file compressor.
6 # Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
9 # lzop and the LZO library are free software; you can redistribute them
10 # and/or modify them 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 # This program 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 this program; 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/lzop/
30 # /***********************************************************************
32 # ************************************************************************/
34 AC_COPYRIGHT([Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer.
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.])
40 AC_INIT([lzop],[1.04],[lzop-bugs@oberhumer.com],[lzop],[http://www.oberhumer.com/opensource/lzop/])
41 AC_MSG_NOTICE([Configuring $PACKAGE_NAME $PACKAGE_VERSION])
42 AC_CONFIG_SRCDIR(src/lzop.c)
43 AC_CONFIG_AUX_DIR(autoconf)
44 m4_include([autoconf/local.m4])
45 AC_PREFIX_DEFAULT(/usr/local)
51 if test -z "$ac_abs_top_srcdir"; then
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
61 AC_ARG_ENABLE(asm, AS_HELP_STRING(--disable-asm,disable LZO assembly versions))
62 AC_ARG_ENABLE(ansi, AS_HELP_STRING(--disable-ansi,disable ansi console))
63 if test "X$enable_ansi" != Xno; then
64 AC_DEFINE(LZOP_ENABLE_ANSI,1,[Define to 1 if should be enabled.])
71 gl_USE_SYSTEM_EXTENSIONS
77 AM_INIT_AUTOMAKE([1.14.1 foreign subdir-objects])
78 AM_SILENT_RULES([yes])
79 AC_CONFIG_HEADERS([config.h:config.hin])
80 AH_TOP([#ifndef LZOP_AUTOCONF_CONFIG_H_INCLUDED__
81 #define LZOP_AUTOCONF_CONFIG_H_INCLUDED__ 1])
82 AH_BOTTOM([#endif /* already included */])
85 # /***********************************************************************
86 # // Checks for header files 1)
87 # ************************************************************************/
90 if test "X$ac_cv_header_limits_h" != Xyes; then
91 AC_MSG_ERROR([<limits.h> header not found])
93 mfx_CHECK_HEADER_SANE_LIMITS_H
94 if test "X$mfx_cv_header_sane_limits_h" != Xyes; then
95 AC_MSG_ERROR([your <limits.h> header is broken - for details see config.log])
99 # /***********************************************************************
100 # // Checks for LZO library
101 # ************************************************************************/
104 if test "X$lzoconf_h" = X; then
105 AC_CHECK_HEADERS([lzo/lzoconf.h lzo/lzo1x.h])
106 if test "X$ac_cv_header_lzo_lzoconf_h$ac_cv_header_lzo_lzo1x_h" = Xyesyes; then
107 lzoconf_h='lzo/lzoconf.h'
110 if test "X$lzoconf_h" = X; then
111 AC_CHECK_HEADERS([lzoconf.h lzo1x.h])
112 if test "X$ac_cv_header_lzoconf_h$ac_cv_header_lzo1x_h" = Xyesyes; then
113 lzoconf_h='lzoconf.h'
116 if test "X$lzoconf_h" = X; then
117 AC_MSG_ERROR([LZO header files not found. Please check your installation or set the environment variable \`CPPFLAGS'.])
121 AC_MSG_CHECKING([for version information in $lzoconf_h...])
123 if test "X$lzoconf_h_version" = X; then
124 AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <$lzoconf_h>
125 #if defined(LZO_VERSION) && (LZO_VERSION >= 0x2000)
127 # error "LZO_VERSION v2"
129 ])], [lzoconf_h_version=2], [])
131 if test "X$lzoconf_h_version" = X; then
132 AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <$lzoconf_h>
133 #if defined(LZO_VERSION) && (LZO_VERSION >= 0x1040)
135 # error "LZO_VERSION v1"
137 ])], [lzoconf_h_version=1], [])
139 AC_MSG_RESULT([v$lzoconf_h_version])
140 if test "X$lzoconf_h_version" = X; then
141 AC_MSG_ERROR([your LZO headers are broken - for details see config.log])
145 if test "X$lzoconf_h_version" = X1; then
146 AC_CHECK_LIB(lzo,__lzo_init2,,AC_MSG_ERROR([LZO library v1 not found. Please check your installation or set the environment variable \`LDFLAGS'.]))
148 if test "X$lzoconf_h_version" = X2; then
149 AC_CHECK_LIB(lzo2,__lzo_init_v2,,AC_MSG_ERROR([LZO library v2 not found. Please check your installation or set the environment variable \`LDFLAGS'.]))
153 # /***********************************************************************
154 # // Checks for header files 2)
155 # ************************************************************************/
157 AC_CHECK_HEADERS([conio.h direct.h dos.h io.h share.h sys/utime.h])
158 dnl AC_CHECK_HEADERS([linux/kd.h linux/kdev_t.h linux/major.h])
159 dnl AC_CHECK_HEADERS([curses.h ncurses.h])
162 # /***********************************************************************
163 # // Checks for typedefs and structures
164 # ************************************************************************/
167 AC_CHECK_TYPE(ptrdiff_t,long)
176 # /***********************************************************************
177 # // Checks for library functions
178 # ************************************************************************/
184 # /***********************************************************************
185 # // Write output files
186 # ************************************************************************/
188 mfx_MINIACC_ACCCHK(["-I$srcdir"],["src/miniacc.h"])
190 if test -r .Conf.settings2; then
194 my_DEFS="-DLZOP_HAVE_CONFIG_H=1"
196 AC_CONFIG_COMMANDS_PRE([
197 test "X$DEFS" = "X-DHAVE_CONFIG_H" && DEFS=
198 test "X$DEFS" != "X" && DEFS="$DEFS "
199 DEFS="${DEFS}${my_DEFS}"
201 AC_CONFIG_FILES([Makefile])
207 lzop configuration summary
208 --------------------------
209 lzop version : ${PACKAGE_VERSION}
210 configured for host : ${host_cpu}-${host_vendor}-${host_os}
211 source code location : ${srcdir}
213 preprocessor definitions : ${DEFS}
214 preprocessor flags : ${CPPFLAGS}
215 compiler flags : ${CFLAGS}
216 linker flags : ${LDFLAGS}
217 link libraries : ${LIBS}
220 ${PACKAGE_NAME} ${PACKAGE_VERSION} configured.
222 Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
225 lzop and the LZO library are free software; you can redistribute them
226 and/or modify them under the terms of the GNU General Public License as
227 published by the Free Software Foundation; either version 2 of
228 the License, or (at your option) any later version.
230 This program is distributed in the hope that it will be useful,
231 but WITHOUT ANY WARRANTY; without even the implied warranty of
232 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
233 GNU General Public License for more details.
235 Markus F.X.J. Oberhumer
236 <markus@oberhumer.com>
237 http://www.oberhumer.com/opensource/lzop/
240 Type \`make' to build ${PACKAGE_NAME}. Type \`make install' to install ${PACKAGE_NAME}.
241 After installing ${PACKAGE_NAME}, please read the accompanied documentation.
245 # vim:set ts=4 sw=4 et: