📄 configure.in
字号:
# Process this file with autoconf to produce a configure script.AC_INIT(src/libaal.c)AC_CANONICAL_HOSTAC_PREREQ(2.50)AH_TEMPLATE([PACKAGE], [Define this to be the name of the package.])AH_TEMPLATE([VERSION], [Define to the version of the package.])AH_TEMPLATE([LIBAAL_MAX_INTERFACE_VERSION], [Define to the max interface version.])AH_TEMPLATE([LIBAAL_MIN_INTERFACE_VERSION], [Define to the min interface version.])AH_TEMPLATE([loff_t], [Define to loff_t])AH_TEMPLATE([ENABLE_DEBUG], [Define for enable debug info.])AH_TEMPLATE([ENABLE_MEMORY_MANAGER], [Define for enable simple memory manager.])LIBAAL_MAJOR_VERSION=1LIBAAL_MINOR_VERSION=0LIBAAL_MICRO_VERSION=5LIBAAL_INTERFACE_AGE=0LIBAAL_BINARY_AGE=0LIBAAL_VERSION=$LIBAAL_MAJOR_VERSION.$LIBAAL_MINOR_VERSION.$LIBAAL_MICRO_VERSIONLT_RELEASE=$LIBAAL_MAJOR_VERSION.$LIBAAL_MINOR_VERSIONLT_CURRENT=`expr $LIBAAL_MICRO_VERSION - $LIBAAL_INTERFACE_AGE`LT_REVISION=$LIBAAL_INTERFACE_AGELT_AGE=`expr $LIBAAL_BINARY_AGE - $LIBAAL_INTERFACE_AGE`AC_SUBST(LT_RELEASE)AC_SUBST(LT_CURRENT)AC_SUBST(LT_REVISION)AC_SUBST(LT_AGE)PACKAGE=libaalVERSION=$LIBAAL_VERSIONAM_INIT_AUTOMAKE($PACKAGE, $VERSION)AM_CONFIG_HEADER(config.h)AM_MAINTAINER_MODEAC_DEFINE_UNQUOTED(LIBAAL_MAX_INTERFACE_VERSION, $LIBAAL_BINARY_AGE)AC_DEFINE_UNQUOTED(LIBAAL_MIN_INTERFACE_VERSION, $LIBAAL_INTERFACE_AGE)AM_ENABLE_SHAREDAC_ARG_ENABLE(Werror, [ --enable-Werror enable build with gcc -Werror], , enable_Werror=no)AC_ARG_ENABLE(debug, [ --enable-debug enable debug information in binaries], , enable_debug=no)AC_ARG_ENABLE(libminimal, [ --disable-libminimal disable building of minimal footprint library], , enable_libminimal=yes)AC_ARG_ENABLE(memory_manager, [ --disable-memory-manager disable memory manager in minimal library], , enable_memory_manager=yes)# Checks for programs.AC_PROG_CC# Checks for libraries.# Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS([errno.h fcntl.h stdlib.h string.h sys/ioctl.h unistd.h])AC_C_BIGENDIAN# Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_C_INLINEAC_TYPE_OFF_TAC_STRUCT_TM# Checks for library functions.AC_PROG_GCC_TRADITIONALAC_FUNC_MEMCMPAC_HEADER_STDCAC_CHECK_FUNCS([memmove memset strchr strerror strpbrk strrchr])# The options -falign-* are supported by gcc 3.0 or later.# Probably it is sufficient to only check for -falign-loops.AC_CACHE_CHECK([whether -falign-loops works], [falign_loop_flag], [ saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-falign-loops=1" AC_TRY_COMPILE(, , [falign_loop_flag=yes], [falign_loop_flag=no]) CPPFLAGS="$saved_CPPFLAGS"]) # Checking for compiler warning optionsAC_CACHE_CHECK([whether -Wuninitialized works], [uninitialized], [ saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-Wuninitialized" AC_TRY_COMPILE(, , [uninitialized=yes], [uninitialized=no]) CPPFLAGS="$saved_CPPFLAGS"]) AC_CACHE_CHECK([whether -Wno-unused-parameter works], [no_unused_parameter], [ saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-Wno-unused-parameter" AC_TRY_COMPILE(, , [no_unused_parameter=yes], [no_unused_parameter=no]) CPPFLAGS="$saved_CPPFLAGS"]) AC_CACHE_CHECK([whether -Wredundant-decls works], [redundant_decls], [ saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-Wredundant-decls" AC_TRY_COMPILE(, , [redundant_decls=yes], [redundant_decls=no]) CPPFLAGS="$saved_CPPFLAGS"]) # Force no alignment to save space.if test "x$falign_loop_flag" = xyes; then ALIGN_FLAGS="-falign-jumps=1 -falign-loops=1 -falign-functions=1 -falign-labels=1 -fomit-frame-pointer -fno-inline -fstrength-reduce"else ALIGN_FLAGS="-malign-jumps=1 -malign-loops=1 -malign-functions=1"fiCFLAGS=""MINIMAL_CFLAGS=""GENERIC_CFLAGS=""# make libc threadsafe (not required for us for awhile, but useful other users of# libaal)GENERIC_CFLAGS="$GENERIC_CFLAGS -D_REENTRANT"AC_SYS_LARGEFILEif test x${ac_cv_sys_file_offset_bits} = xno; then AC_MSG_WARN(Can't detect right _FILE_OFFSET_BITS. Will be forced to 64bit.) ac_cv_sys_file_offset_bits=64fiGENERIC_CFLAGS="$GENERIC_CFLAGS -D_FILE_OFFSET_BITS=${ac_cv_sys_file_offset_bits}"AC_CHECK_SIZEOF(off_t, 64, [ #include <stdio.h> #include <sys/types.h> #include <unistd.h>])AM_PROG_LIBTOOLif test x$enable_libminimal = xyes; then if test x$enable_memory_manager = xyes; then MEMORY_MANAGER_CFLAGS="-DENABLE_MEMORY_MANAGER" fi MINIMAL_CFLAGS="$MINIMAL_CFLAGS -DENABLE_MINIMAL $MEMORY_MANAGER_CFLAGS $ALIGN_FLAGS"fiCFLAGS="$CFLAGS -W -Wall"if test x$enable_debug = xyes; then GENERIC_CFLAGS="$GENERIC_CFLAGS -O0 -g" MINIMAL_CFLAGS="$MINIMAL_CFLAGS -O0 -g"else GENERIC_CFLAGS="$GENERIC_CFLAGS -O3" MINIMAL_CFLAGS="$MINIMAL_CFLAGS -Os" if test "x$uninitialized" = xyes; then CFLAGS="$CFLAGS -Wuninitialized" fifiif test "x$no_unused_parameter" = xyes; then CFLAGS="$CFLAGS -Wno-unused-parameter"else CFLAGS="$CFLAGS -Wno-unused"fiif test "x$redundant_decls" = xyes; then CFLAGS="$CFLAGS -Wredundant-decls"fiif test x$enable_Werror = xyes; then CFLAGS="$CFLAGS -Werror"fiAM_CONDITIONAL(ENABLE_MINIMAL, test x$enable_libminimal = xyes)AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes)if test x$enable_debug = xyes; then AC_DEFINE(ENABLE_DEBUG)fiAC_SUBST(MINIMAL_CFLAGS)AC_SUBST(GENERIC_CFLAGS)AC_OUTPUT([ Makefile include/Makefile include/aal/Makefile src/Makefile libaal.spec])echoecho Type \'make\' to compile libaal and \'make install\' to install it.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -