📄 configure.ac
字号:
#-*- Autoconf -*-# Process this file with autoconf to produce a configure script.AC_PREREQ(2.5)AC_INIT([pbc], [0.4.9], [blynn@cs.stanford.edu])AM_INIT_AUTOMAKEAM_CONFIG_HEADER(config.h)AC_CONFIG_SRCDIR([./])AC_PROG_LIBTOOL#AC_CANONICAL_HOSTCFLAGS=default_fink_path=/swcase $host_os in darwin*) dnl nested function support AC_MSG_NOTICE([Adding -fnested-functions to CFLAGS]) CFLAGS="-fnested-functions" dnl fink installation AC_MSG_CHECKING([for a fink installation at $default_fink_path]) if test -d $default_fink_path; then AC_MSG_RESULT([found it!]) AC_MSG_NOTICE([Adding -I$default_fink_path/include to CPPFLAGS]) CPPFLAGS="-I$default_fink_path/include $CPPFLAGS" AC_MSG_NOTICE([Adding -L$default_fink_path/lib to LDFLAGS]) LDFLAGS="-L$default_fink_path/lib $LDFLAGS" else AC_MSG_RESULT(none) AC_MSG_NOTICE([You may need to add set CPPFLAGS and LDFLAGS for gmp, etc.]) fi ;;esac# Checks for programs.AC_PROG_CCAC_PROG_CPPAC_PROG_INSTALLAC_PROG_LN_SAC_PROG_MAKE_SET# Checks for libraries.lib_err_msg="add its path to LDFLAGS\nsee ./configure --help"AC_CHECK_LIB( [m], [pow], [],[ echo "************************" echo "m library not found" echo -e $lib_err_msg echo "************************" exit -1 ])AC_CHECK_LIB( [gmp], [__gmpz_init], [],[ echo "************************" echo "gmp library not found" echo -e $lib_err_msg echo "************************" exit -1 ])dnl Reset libs because most programs do not need to link against all of these libs.LIBS=# Checks for header files.AC_FUNC_ALLOCAAC_HEADER_STDCAC_CHECK_HEADERS([stdlib.h string.h sys/time.h])# Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_C_INLINEAC_TYPE_SIZE_TAC_HEADER_TIMEdnl setup CFLAGSwith_enable_optimized="no"AC_ARG_ENABLE( optimized, [AC_HELP_STRING([--enable-optimized], [Enable optimized build])], [with_enable_optimized="$withval"], [with_enable_optimized="no"])CFLAGS="$CFLAGS -Wall -W -Wfloat-equal -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wredundant-decls \-Wendif-labels -Wshadow -pipe -ffast-math -U__STRICT_ANSI__ -std=c99"if test "x$with_enable_optimized" != "no"; then CFLAGS="$CFLAGS -g -O2"else CFLAGS="$CFLAGS -fomit-frame-pointer -O3"fi# Checks for library functions.AC_FUNC_MALLOCAC_FUNC_REALLOCAC_CHECK_FUNCS([floor gettimeofday memmove memset pow sqrt strchr strdup])AC_CONFIG_FILES([Makefile example/Makefile gen/Makefile])AC_OUTPUTecho -ne "\n"echo "global build variables"echo "-----------------------------------------"echo `date`echo "host info: $host"echo "optimized build: $with_enable_optimized"echo "LDFLAGS: $LDFLAGS"echo "CPPFLAGS: $CPPFLAGS"echo "CFLAGS: $CFLAGS"echo "-----------------------------------------"echo -ne "\n"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -