1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
|
#
# configure.ac -- autoconf configuration for the UCL library
#
# This file is part of the UCL data compression library.
#
# Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
# All Rights Reserved.
#
# The UCL library 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.
#
# The UCL library 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 the UCL library; see the file COPYING.
# If not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Markus F.X.J. Oberhumer
# <markus@oberhumer.com>
# http://www.oberhumer.com/opensource/ucl/
#
# /***********************************************************************
# // Init
# ************************************************************************/
AC_COPYRIGHT([Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer.
All Rights Reserved.
This configure script may be copied, distributed and modified under the
terms of the GNU General Public License; see COPYING for more details.])
AC_PREREQ(2.59)
AC_INIT(ucl,1.03,markus@oberhumer.com)
AC_MSG_NOTICE([Configuring UCL $PACKAGE_VERSION])
AC_CONFIG_SRCDIR(src/ucl_init.c)
AC_CONFIG_AUX_DIR(acconfig)
AC_PREFIX_DEFAULT(/usr/local)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_MAINTAINER_MODE
if test -z "$ac_abs_top_srcdir"; then
_AC_SRCPATHS(.)
fi
if test -r .Conf.settings1; then
. ./.Conf.settings1
fi
AC_PROG_CC
AC_PROG_CPP
mfx_PROG_CPPFLAGS
AC_C_CONST
mfx_ACC_CHECK_ENDIAN
AC_SYS_LARGEFILE
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h:config.hin)
AC_ENABLE_STATIC
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
# /***********************************************************************
# // Checks for assembler
# ************************************************************************/
AC_ARG_ENABLE(asm, AC_HELP_STRING([--disable-asm], [disable i386 assembly versions]))
case $host_cpu in
i?86) ;;
*) enable_asm=no ;;
esac
UCL_ASM_VPATH=
AC_MSG_CHECKING([whether to build i386 assembly versions])
if test "X$enable_asm" != Xno; then
mfx_compile_S='${CC-cc} -c conftest.S 1>&AS_MESSAGE_LOG_FD'
cat > conftest.S <<EOF
#include "$ac_abs_top_srcdir/asm/i386/src_gas/crc_asm.S"
EOF
enable_asm=no
if AC_TRY_EVAL(mfx_compile_S); then
if AC_TRY_COMMAND([test -s conftest.$ac_objext]); then
enable_asm=yes
UCL_ASM_VPATH=":$ac_abs_top_srcdir/asm/i386/src_gas"
fi
fi
if test "X$enable_asm" = Xno; then
echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.S >&AS_MESSAGE_LOG_FD
fi
rm -rf conftest*
fi
AC_MSG_RESULT([$enable_asm])
AM_CONDITIONAL(UCL_USE_ASM, [test "X$enable_asm" != Xno])
AC_SUBST(UCL_ASM_VPATH)
# /***********************************************************************
# // Checks for header files
# ************************************************************************/
mfx_ACC_CHECK_HEADERS
dnl AC_CHECK_HEADERS([sys/param.h sys/resource.h sys/times.h])
if test "X$ac_cv_header_limits_h" != Xyes; then
AC_MSG_ERROR([<limits.h> header not found])
fi
mfx_CHECK_HEADER_SANE_LIMITS_H
if test "X$mfx_cv_header_sane_limits_h" != Xyes; then
AC_MSG_ERROR([your <limits.h> header is broken - for details see config.log])
fi
# /***********************************************************************
# // Checks for typedefs and structures
# ************************************************************************/
AC_TYPE_OFF_T
AC_CHECK_TYPE(ptrdiff_t,long)
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
mfx_ACC_CHECK_SIZEOF
mfx_CHECK_SIZEOF
# /***********************************************************************
# // Checks for library functions
# ************************************************************************/
mfx_ACC_CHECK_FUNCS
mfx_CHECK_LIB_WINMM
# /***********************************************************************
# // Write output files
# ************************************************************************/
mfx_ACC_ACCCHK(["-I$srcdir -I$srcdir/acc"])
if test -r .Conf.settings2; then
. ./.Conf.settings2
fi
CPPFLAGS="$CPPFLAGS -DUCL_HAVE_CONFIG_H"
if test "X$enable_asm" != Xno; then
CPPFLAGS="$CPPFLAGS -DUCL_USE_ASM"
fi
AC_SUBST(UCL_CPPFLAGS)
AC_SUBST(UCL_EXTRA_CPPFLAGS)
AC_SUBST(UCL_CFLAGS)
AC_SUBST(UCL_EXTRA_CFLAGS)
configure_CPPFLAGS=$CPPFLAGS
configure_CFLAGS=$CFLAGS
AC_SUBST(configure_CPPFLAGS)
AC_SUBST(configure_CFLAGS)
AC_CONFIG_FILES([Makefile examples/Makefile include/Makefile include/ucl/Makefile src/Makefile])
AC_OUTPUT
cat <<EOF
UCL configuration summary
-------------------------
UCL version : ${PACKAGE_VERSION}
host operating system : ${host_cpu}-${host_vendor}-${host_os}
source code location : ${srcdir}
compiler : ${CC}
preprocessor flags : ${CPPFLAGS}
compiler flags : ${CFLAGS}
build static library : ${enable_static}
build shared library : ${enable_shared}
enable i386 assembly code : ${enable_asm}
UCL ${PACKAGE_VERSION} configured.
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
The UCL library 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.
The UCL library 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.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/opensource/ucl/
Type \`make' to build UCL. Type \`make install' to install UCL.
After installing UCL, please read the accompanied documentation.
EOF
# vi:ts=4:et
|