⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 lzo-1.08-src.zip 高效的压缩解压代码
💻 IN
字号:
dnl Process this file with autoconf to produce a configure script.##  configure.in -- autoconf configuration for the LZO library##  This file is part of the LZO real-time data compression library.##  Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer#  Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer#  Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer#  Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer#  Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer#  Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer#  Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer##  The LZO 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 LZO 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 LZO 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>## /***********************************************************************# // Init autoconf# ************************************************************************/AC_PREREQ(2.53)AC_INIT(lzo,1.08)AC_CONFIG_SRCDIR(src/lzo_init.c)AC_CONFIG_AUX_DIR(acconfig)AC_PREFIX_DEFAULT(/usr/local)AC_CANONICAL_BUILDAC_CANONICAL_HOSTAC_CANONICAL_TARGET# /***********************************************************************# // Prepare local settings# ************************************************************************/CPPFLAGS="$CPPFLAGS"CFLAGS="$CFLAGS"CXXFLAGS="$CXXFLAGS"CFLAGS_O=""CFLAGS_W=""CFLAGS_W_PEDANTIC=""AC_SUBST(CFLAGS_O)AC_SUBST(CFLAGS_W)AC_SUBST(CFLAGS_W_PEDANTIC)AC_SUBST(ASFLAGS)AC_SUBST(LZO_CFLAGS)mfx_settings="./Conf.settings"if test -r "$mfx_settings"; then  echo "loading settings $mfx_settings"  mfx_settings_stage=1  . $mfx_settingsfi# /***********************************************************************# // Init automake# ************************************************************************/AC_PROG_CCmfx_CHECK_CROSSmfx_PROG_CC_ANSIAM_INIT_AUTOMAKE(lzo,1.08)AM_CONFIG_HEADER(config.h:config.hin)AM_MAINTAINER_MODEmfx_PROG_MAKE_GNU(mfx_GMAKE)AM_CONDITIONAL(GMAKE, test x$mfx_GMAKE = xyes)MOSTLYCLEANFILES='*.i'CLEANFILES='*.bb *.bbg *.da *.gcov bb.out bbtrace* gmon.out'AC_SUBST(MOSTLYCLEANFILES)AC_SUBST(CLEANFILES)mfx_enable_static="$enable_static"mfx_enable_shared="$enable_shared"AC_ENABLE_STATICAC_DISABLE_SHAREDAM_WITH_DMALLOCdnl Allow the --disable-asm flag to stop us from building assembler functions.AC_ARG_ENABLE(asm,[  --enable-asm            try to build assembler versions [default=yes]],[test "$enableval" = no && enable_asm=no])test "$enable_asm" = no || enable_asm=yesAC_ARG_ENABLE(debug,[  --enable-debug          build a debug version [default=no]],[test "$enableval" = yes && enable_debug=yes])test "$enable_debug" = yes || enable_debug=noAC_ARG_ENABLE(profiling,[  --enable-profiling      build a profiling version [default=no]],[test "$enableval" = yes && enable_profiling=yes])test "$enable_profiling" = yes || enable_profiling=noAC_ARG_ENABLE(coverage,[  --enable-coverage       build a coverage version [default=no]],[test "$enableval" = yes && enable_coverage=yes])test "$enable_coverage" = yes || enable_coverage=no# /***********************************************************************# // Checks for compiler# ************************************************************************/AC_EXEEXTAC_PROG_CPPAC_PROG_CC_C_Omfx_PROG_CC_INTEGRAL_PROMOTIONmfx_PROG_CC_CHECKERGCCdnl gcc -pipe makes troubles on some architectures (e.g. cygwin32)if test "$USE_MAINTAINER_MODE" = yes; thenmfx_PROG_GCC_PIPEfiif test "$enable_debug" = yes; then  CPPFLAGS="$CPPFLAGS -DLZO_DEBUG"fiAC_MSG_CHECKING([whether to build a debug version])AC_MSG_RESULT($enable_debug)if test "$GCC" = yes; then  if test "$enable_profiling" = yes; thendnl    x="-pg -ax"    x="-pg"    LZO_CFLAGS="$LZO_CFLAGS $x"    LDFLAGS="$LDFLAGS $x"  fielse  enable_profiling=nofiAC_MSG_CHECKING([whether to build a profiling version])AC_MSG_RESULT($enable_profiling)if test "$GCC" = yes; then  if test "$enable_coverage" = yes; then    x="-fprofile-arcs -ftest-coverage"    LZO_CFLAGS="$LZO_CFLAGS -DLZO_COVERAGE $x -O0"  fielse  enable_coverage=nofiAC_MSG_CHECKING([whether to build a coverage version])AC_MSG_RESULT($enable_coverage)# /***********************************************************************# // Initialize libtool# ************************************************************************/dnl maintainer defaults to --disable-sharedif test "$USE_MAINTAINER_MODE" = yes; then  test -z "$mfx_enable_shared" && enable_shared=nofiAC_PROG_LIBTOOLif test "$USE_MAINTAINER_MODE" = yes; then  dnl configure libtool: use /bin/ash (it's quite a bit faster), be silent  if test -x /bin/ash; then    LIBTOOL='/bin/ash $(top_builddir)/libtool'  fi  LIBTOOL="$LIBTOOL --silent"filiblzo='$(top_builddir)/src/liblzo.la'AC_SUBST(liblzo)# /***********************************************************************# // Checks for other programs# ************************************************************************/AC_CHECK_PROG(NASM,nasm,nasm)# /***********************************************************************# // Checks for libraries# ************************************************************************/if test "$USE_MAINTAINER_MODE" = yes; thenif test "$mfx_cv_prog_checkergcc" = no; thenmfx_save_LIBS="$LIBS"AC_CHECK_LIB(z,gzputs)ltest_LIBS="$LIBS"LIBS="$mfx_save_LIBS"AC_SUBST(ltest_LIBS)fifi# /***********************************************************************# // Checks for system and library header files# ************************************************************************/AC_HEADER_STDCAC_HEADER_TIMEAC_CHECK_HEADERS(assert.h ctype.h limits.h signal.h stddef.h time.h unistd.h)AC_CHECK_HEADERS(sys/param.h sys/resource.h sys/time.h sys/times.h)AC_CHECK_HEADERS(endian.h sys/endian.h unchecked.h)AC_CHECK_HEADERS(zlib.h)if test "$ac_cv_header_limits_h" = no; then  AC_MSG_ERROR([<limits.h> header not found found])fimfx_CHECK_HEADER_SANE_LIMITS_Hif test "$mfx_cv_header_sane_limits_h" = no; then  AC_MSG_ERROR([your limits.h header is broken - for details see config.log])fi# /***********************************************************************# // Checks for typedefs and structures# ************************************************************************/AC_CHECK_TYPE(ptrdiff_t,long)AC_TYPE_SIZE_TAC_CHECK_SIZEOF(unsigned short)AC_CHECK_SIZEOF(unsigned)AC_CHECK_SIZEOF(unsigned long)AC_CHECK_SIZEOF(char *)AC_CHECK_SIZEOF(ptrdiff_t)AC_CHECK_SIZEOF(size_t)# /***********************************************************************# // Checks for compiler characteristics# ************************************************************************/AC_C_CONSTdnl not available when cross-compilingmfx_C_BYTE_ORDER# /***********************************************************************# // Checks for library functions# ************************************************************************/AC_CHECK_FUNCS(memcmp memcpy memmove memset)AC_CHECK_FUNCS(memicmp strcasecmp strncasecmp stricmp strnicmp)AC_CHECK_FUNCS(atol fstat getrusage gettimeofday lstat stat times)mfx_FUNC_MEMCMP# /***********************************************************************# // Checks for system services# ************************************************************************/# /***********************************************************************# // Customization# ************************************************************************/mfx_CUSTOMIZEAC_SUBST(SRC_VPATH)SRC_VPATH=""if test "$GCC" = yes; then  if test "$MFX_ARCH" = "i386"; then    SRC_VPATH="/${MFX_ARCH}/src"    enable_asm=yes  fifiif test "$mfx_unaligned_ok_2" = yes; then  AC_DEFINE(LZO_UNALIGNED_OK_2)fiif test "$mfx_unaligned_ok_4" = yes; then  AC_DEFINE(LZO_UNALIGNED_OK_4)fidnl never activate this by defaultif test "1" = "2"; then  AC_DEFINE(LZO_ALIGNED_OK_4)fi# /***********************************************************************# // Checks for assembler support# ************************************************************************/if test "$GCC" = yes; then  ASFLAGS="$ASFLAGS -x assembler-with-cpp"fimfx_asflags=""mfx_compile_s='${CC-cc} -c $ASFLAGS $CPPFLAGS $mfx_asflags conftest.s 1>&AC_FD_CC'AC_CACHE_CHECK(the alignment of the assembler, mfx_cv_asm_align,[AC_TRY_RUN([#include <stdio.h>int test() {#if defined(__GNUC__)  __asm__ __volatile__ ("  .align 4mfx_a1:  .byte 0  .align 4mfx_a2:  ");#endif  return 0;}main() {#if defined(__GNUC__)  extern char mfx_a1 __asm__("mfx_a1");  extern char mfx_a2 __asm__("mfx_a2");  long l = &mfx_a2 - &mfx_a1;  FILE *f = fopen("conftestval", "w");  if (!f) exit(1);  fprintf(f, "%ld\n", l);  exit(0);#else  exit(2);#endif}],mfx_cv_asm_align=`cat conftestval`,mfx_cv_asm_align="0",mfx_cv_asm_align="0")])if test "$mfx_cv_asm_align" = "16"; then  AC_DEFINE(MFX_ASM_ALIGN_PTWO)else  AC_DEFINE(MFX_ASM_ALIGN_BYTES)fiif test "$mfx_cv_asm_align" = "0"; then  enable_asm=nofiif test "$enable_asm" = yes; thenAC_MSG_CHECKING([whether global symbols need underscores])AC_TRY_LINK([#ifdef __cplusplus  extern "C"#endif  int mfx_asm_func();  static void test() {    __asm__ __volatile__("    .globl mfx_asm_func    mfx_asm_func:      .byte 0    ");  }], [  return mfx_asm_func();], [  AC_DEFINE(MFX_ASM_NAME_NO_UNDERSCORES)  AC_MSG_RESULT(no)], [  AC_MSG_RESULT(yes)])fiif test "$enable_asm" = yes; thenAC_MSG_CHECKING([whether the assembler understands .type])cat > conftest.s <<EOF[#]line __oline__ "configure"#include "confdefs.h".type test,@function ; .globl test ; test:.byte 0.size test,.-testEOFif AC_TRY_EVAL(mfx_compile_s); then  AC_DEFINE(MFX_ASM_HAVE_TYPE)  AC_MSG_RESULT(yes)else  echo "configure: failed program was:" >&AC_FD_CC  cat conftest.s >&AC_FD_CC  AC_MSG_RESULT(no)firm -rf conftest*fiif test "$enable_asm" = yes; thenAC_MSG_CHECKING([whether the assembler works])cat > conftest.s <<EOF[#]line __oline__ "configure"#include "confdefs.h"#define IN_CONFIGURE#include "lzo1x_f2.s"EOFmfx_asflags="-I$srcdir/src/$MFX_ARCH/src"if AC_TRY_EVAL(mfx_compile_s); then  :else  echo "configure: failed program was:" >&AC_FD_CC  cat conftest.s >&AC_FD_CC  enable_asm=nofimfx_asflags=""rm -rf conftest*AC_MSG_RESULT($enable_asm)fiAC_MSG_CHECKING([whether to build assembler versions])AC_MSG_RESULT($enable_asm)AC_SUBST(LZO_ASM_OBJECTS)LZO_ASM_OBJECTS=""if test "$enable_asm" = yes; then  LZO_ASM_OBJECTS="\$(LZO_ASM_OBJECTS_${MFX_CC}_${MFX_ARCH})"else  AC_DEFINE(LZO_NO_ASM)fimfx_asflags=""mfx_compile_s=""# /***********************************************************************# // Maintainer uses -Werror and lots of pedantic warnings.# // This is not enabled by default because it requires# // very clean system headers.# ************************************************************************/if test "$USE_MAINTAINER_MODE" = yes; then  if test "$GCC" = yes; then    x=`grep -h '^-' $srcdir/B/gcc_lzo.opt`    x=`echo $x`    CFLAGS_W_PEDANTIC="$CFLAGS_W_PEDANTIC -W -pedantic $x"    #    Werror="-Werror"    test "$enable_debug" = yes && Werror=""    test "$mfx_cv_prog_checkergcc" = yes && Werror=""    test -z "$Werror" || CFLAGS_W="$CFLAGS_W $Werror"  fifiCPPFLAGS="$CPPFLAGS -DLZO_HAVE_CONFIG_H"test "$USE_MAINTAINER_MODE" = yes && CPPFLAGS="$CPPFLAGS -DMAINT"# /***********************************************************************# // Write output files# ************************************************************************/AC_OUTPUT(Makefile examples/Makefile include/Makefile ltest/Makefile minilzo/Makefile src/Makefile tests/Makefile)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -