summaryrefslogtreecommitdiff
path: root/lzo/configure.ac
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-02 21:42:07 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-02 21:42:07 +0200
commit21c3e54010129b504891e1786bf425d89328c969 (patch)
tree2e3eba26f5f0fa454188e1b52c7cab3761c4f208 /lzo/configure.ac
parentd4a1b52faa85df4446560a48c6bcc57f016e0c3c (diff)
parentb42eacfa8da0a642d629714f188cc0fc4c7e601a (diff)
Merge
Diffstat (limited to 'lzo/configure.ac')
-rw-r--r--lzo/configure.ac133
1 files changed, 68 insertions, 65 deletions
diff --git a/lzo/configure.ac b/lzo/configure.ac
index 07c25020..cda9734a 100644
--- a/lzo/configure.ac
+++ b/lzo/configure.ac
@@ -3,7 +3,7 @@
#
# This file is part of the LZO data compression library.
#
-# Copyright (C) 1996-2008 Markus Franz Xaver Johannes Oberhumer
+# Copyright (C) 1996-2011 Markus Franz Xaver Johannes Oberhumer
# All Rights Reserved.
#
# The LZO library is free software; you can redistribute it and/or
@@ -31,16 +31,17 @@
# // Init
# ************************************************************************/
-AC_COPYRIGHT([Copyright (C) 1996-2008 Markus Franz Xaver Johannes Oberhumer.
+AC_COPYRIGHT([Copyright (C) 1996-2011 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([lzo],[2.03],[markus@oberhumer.com])
+AC_PREREQ(2.67)
+AC_INIT([LZO],[2.06],[markus@oberhumer.com],[lzo],[http://www.oberhumer.com/opensource/lzo/])
AC_MSG_NOTICE([Configuring LZO $PACKAGE_VERSION])
AC_CONFIG_SRCDIR(src/lzo_init.c)
AC_CONFIG_AUX_DIR(autoconf)
+m4_include([autoconf/local.m4])
AC_PREFIX_DEFAULT(/usr/local)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
@@ -48,69 +49,31 @@ AC_CANONICAL_TARGET
AM_MAINTAINER_MODE
if test -z "$ac_abs_top_srcdir"; then
- _AC_SRCPATHS(.)
+ _AC_SRCDIRS([.])
+fi
+if test -z "$ac_abs_top_srcdir"; then
+ as_fn_error 1 "internal error: ac_abs_top_srcdir is not set"
fi
if test -r .Conf.settings1; then
. ./.Conf.settings1
fi
AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_AS
AC_PROG_CPP
mfx_PROG_CPPFLAGS
AC_C_CONST
mfx_LZO_CHECK_ENDIAN
AC_SYS_LARGEFILE
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([1.11.1 gnu subdir-objects])
+AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([config.h:config.hin])
AC_ENABLE_STATIC
AC_DISABLE_SHARED
-AC_PROG_LIBTOOL
-
-
-# /***********************************************************************
-# // Checks for assembler
-# ************************************************************************/
-
-AC_ARG_ENABLE(asm, AS_HELP_STRING(--disable-asm,disable assembly versions))
-
-asm_arch=
-asm_dir=
-asm_msg_amd64=no
-asm_msg_i386=no
-
-case $host_cpu in
- amd64 | x86_64) asm_arch="amd64"; asm_dir="asm/amd64/src_gas/elf64" ;;
- i?86) asm_arch="i386"; asm_dir="asm/i386/src_gas" ;;
- *) enable_asm=no ;;
-esac
-LZO_ASM_VPATH=
-
-AC_MSG_CHECKING([whether to build 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_dir/lzo1x_f1.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
- eval asm_msg_$asm_arch="'yes [[$asm_dir]]'"
- LZO_ASM_VPATH=":$ac_abs_top_srcdir/$asm_dir"
- 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(LZO_USE_ASM, [test "X$enable_asm" != Xno])
-AC_SUBST(LZO_ASM_VPATH)
+LT_INIT
# /***********************************************************************
@@ -150,6 +113,50 @@ mfx_CHECK_LIB_WINMM
# /***********************************************************************
+# // Checks for assembler
+# ************************************************************************/
+
+AC_ARG_ENABLE(asm, AS_HELP_STRING(--disable-asm,disable assembly versions))
+
+asm_arch=
+asm_dir=
+asm_msg_amd64=no
+asm_msg_i386=no
+
+case "$host_cpu-$ac_cv_sizeof_void_p" in
+ amd64-8 | x86_64-8) asm_arch="amd64"; asm_dir="asm/amd64/src_gas/elf64"; asm_mode="amd64_src_gas_elf64" ;;
+ i?86-4) asm_arch="i386"; asm_dir="asm/i386/src_gas"; asm_mode="i386_src_gas" ;;
+ *) enable_asm=no ;;
+esac
+LZO_USE_ASM_i386_src_gas=no
+
+AC_MSG_CHECKING([whether to build assembly versions])
+if test "X$enable_asm" != Xno; then
+mfx_compile_S='${CCAS} ${CCASFLAGS} -c conftest.S 1>&AS_MESSAGE_LOG_FD'
+cat > conftest.S <<EOF
+#include "$ac_abs_top_srcdir/$asm_dir/lzo1x_f1.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
+ eval asm_msg_$asm_arch="'yes [[$asm_dir]]'"
+ eval LZO_USE_ASM_$asm_mode=yes
+ 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(LZO_USE_ASM_i386_src_gas, [test "X$LZO_USE_ASM_i386_src_gas" != Xno])
+AM_CONDITIONAL(LZO_USE_ASM_i386_obj_elf32, [false])
+
+
+# /***********************************************************************
# // Write output files
# ************************************************************************/
@@ -159,22 +166,17 @@ if test -r .Conf.settings2; then
. ./.Conf.settings2
fi
-test "X$CPPFLAGS" != "X" && CPPFLAGS="$CPPFLAGS "
-CPPFLAGS="${CPPFLAGS}-DLZO_HAVE_CONFIG_H"
+my_DEFS="-DLZO_HAVE_CONFIG_H=1"
if test "X$enable_asm" != Xno; then
- CPPFLAGS="$CPPFLAGS -DLZO_USE_ASM"
+ my_DEFS="$my_DEFS -DLZO_USE_ASM=1"
fi
-AC_SUBST(LZO_CPPFLAGS)
-AC_SUBST(LZO_EXTRA_CPPFLAGS)
-AC_SUBST(LZO_CFLAGS)
-AC_SUBST(LZO_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/lzo/Makefile lzotest/Makefile minilzo/Makefile src/Makefile tests/Makefile])
+AC_CONFIG_COMMANDS_PRE([
+ test "X$DEFS" = "X-DHAVE_CONFIG_H" && DEFS=
+ test "X$DEFS" != "X" && DEFS="$DEFS "
+ DEFS="${DEFS}${my_DEFS}"
+])
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT
@@ -187,6 +189,7 @@ cat <<EOF
configured for host : ${host_cpu}-${host_vendor}-${host_os}
source code location : ${srcdir}
compiler : ${CC}
+ preprocessor definitions : ${DEFS}
preprocessor flags : ${CPPFLAGS}
compiler flags : ${CFLAGS}
build static library : ${enable_static}
@@ -196,7 +199,7 @@ cat <<EOF
LZO ${PACKAGE_VERSION} configured.
- Copyright (C) 1996-2008 Markus Franz Xaver Johannes Oberhumer
+ Copyright (C) 1996-2011 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
The LZO library is free software; you can redistribute it and/or