📄 configure.ac
字号:
dnl Process this file with autoconf to produce a configure script.AC_REVISION([$Revision: 1.46 $])dnlAC_INIT(memcheck, 0.1.4, hald@kc.rr.com)dnlAC_CONFIG_SRCDIR(memcheck.h)dnlAC_CANONICAL_TARGETAM_INIT_AUTOMAKE(memcheck, 0.1.4)dnlAM_CONFIG_HEADER(config.h)dnldnlAC_ARG_ENABLE(warnings,dnl[AC_HELP_STRING(--enable-warnings, [Compiler warnings])])dnlAC_ARG_ENABLE(aggressive-warn,dnl[AC_HELP_STRING(--enable-aggressive-warn,dnl [Aggressive compiler warnings])],dnlenable_warnings=yes)dnldnlDESCRIPTION=["Memory allocation checker"]AC_DEFINE_UNQUOTED(DESCRIPTION, "$DESCRIPTION", [Description of package])dnlabi_cur=1abi_rev=4abi_age=1abi_full=${abi_cur}:${abi_rev}:${abi_age}AC_SUBST(abi_full)dnlAC_SUBST(libmemcheck_la_LDFLAGS, ["-version-info ${abi_full}"])dnldnl Checks for programs.AC_PROG_AWKAC_PROG_CCAC_PROG_CPPCF_PROG_CC_CPLUSPLUSif test "${enable_warnings}" = yes; then CF_GCC_WARNINGSfiAC_PROG_LN_SAM_PROG_LIBTOOLAC_SUBST(LIBTOOL_DEPS)dnldnldnl Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS([stdarg.h vararg.h], break)dnlAC_CHECK_HEADERS([string.h strings.h memory.h], break)dnlAC_CHECK_HEADERS([errno.h fcntl.h limits.h malloc.h setjmp.h stdlib.h signal.h sys/mman.h sys/stat.h sys/types.h unistd.h])dnlAC_CHECK_HEADERS([sys/reg.h])dnlAC_CHECK_HEADERS([sys/param.h], , , [#ifdef HAVE_SYS_PARAM_H# include <sys/param.h>#endif])dnlAC_CHECK_HEADERS([sys/user.h], , , [#ifdef HAVE_SYS_REG_H# include <sys/reg.h>#endif#ifdef HAVE_SYS_PARAM_H# include <sys/param.h>#endif])dnlAC_CHECK_HEADERS([ucontext.h], , , [#ifdef HAVE_SIGNAL_H# include <signal.h>#endif#ifdef HAVE_SYS_REG_H# include <sys/reg.h>#endif#ifdef HAVE_SYS_PARAM_H# include <sys/param.h>#endif#ifdef HAVE_SYS_USER_H# include <sys/user.h>#endif])dnlAC_CHECK_HEADERS([execinfo.h])dnldnlcase ${build_os} in aix* ) CPPFLAGS="-D_ALL_SOURCE" ;; hpux* ) CPPFLAGS="-D_HPUX_SOURCE" ;; linux* ) CPPFLAGS="-D_GNU_SOURCE" ;; osf* ) CPPFLAGS="-D_OSF_SOURCE -D_XOPEN_SOURCE_EXTENDED" ;; solaris* ) CPPFLAGS="-D__EXTENSIONS__" ;; * ) CPPFLAGS="" ;;esacdnldnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_TYPE_SIZE_TAC_TYPE_SIGNALAC_CHECK_TYPES(caddr_t, , , [#include <sys/types.h>])dnlAC_CHECK_TYPES([sigjmp_buf], , AC_CHECK_TYPES([jmp_buf], , , [#ifdef HAVE_SETJMP_H# include <setjmp.h>#endif]), [#ifdef HAVE_SETJMP_H# include <setjmp.h>#endif])dnlAC_CHECK_TYPES(sig_atomic_t, , AC_DEFINE(sig_atomic_t, int, [Define to int ifsignal.h doesn't define]), [#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnlAC_CHECK_TYPES([ucontext_t], , ,[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif#ifdef HAVE_SYS_REG_H# include <sys/reg.h>#endif#ifdef HAVE_SYS_PARAM_H# include <sys/param.h>#endif#ifdef HAVE_SYS_USER_H# include <sys/user.h>#endif#ifdef HAVE_UCONTEXT_H# include <ucontext.h>#endif])dnlAC_CHECK_TYPES([sigcontext_t], , AC_CHECK_TYPES([struct sigcontext], AC_DEFINE(sigcontext_t, [struct sigcontext], [Define to struct sigcontext if signal.h doesn't define]), , [#ifdef HAVE_SIGNAL_H# include <signal.h>#endif]), [#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnlAC_CHECK_TYPES([sigaction_t], , AC_CHECK_TYPES([struct sigaction], AC_DEFINE(sigaction_t, [struct sigaction], [Define to struct sigaction if signal.h doesn't define]), , [#ifdef HAVE_SIGNAL_H# include <signal.h>#endif]),[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnlAC_CHECK_TYPES([siginfo_t], , ,[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnlif test "${ac_cv_type_sigaction_t}" = yesthen AC_CHECK_MEMBERS([sigaction_t.sa_sigaction], , AC_CHECK_MEMBERS([sigaction_t.sa_handler], , , [#ifdef HAVE_SIGNAL_H# include <signal.h>#endif]),[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnlfiif test "${ac_cv_type_struct_sigaction}" = yesthen AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , AC_CHECK_MEMBERS([struct sigaction.sa_handler], , , [#ifdef HAVE_SIGNAL_H# include <signal.h>#endif]),[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnlfiif test "${ac_cv_type_siginfo_t}" = yesthen AC_CHECK_MEMBERS([siginfo_t.si_addr], , ,[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnl AC_CHECK_MEMBERS([siginfo_t.si_ptr], , ,[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnlfiif test "${ac_cv_type_ucontext_t}" = yesthen AC_CHECK_MEMBERS([ucontext_t.uc_mcontext.sc_ip, ucontext_t.uc_mcontext.sc_pc, ucontext_t.uc_mcontext.rip, ucontext_t.uc_mcontext.eip, ucontext_t.uc_mcontext.mc_rip, ucontext_t.uc_mcontext.mc_eip, ucontext_t.uc_mcontext.mc_err, ucontext_t.uc_mcontext.arm_pc, ucontext_t.uc_mcontext.gr8, ucontext_t.uc_mcontext.sc, ucontext_t.uc_mcontext.gregs, ucontext_t.uc_mcontext.sc_regs, ucontext_t.uc_mcontext.mc_regs, ucontext_t.uc_mcontext.sc_traparg_a0, ucontext_t.uc_mcontext.cr2, ucontext_t.uc_mcontext.fault_address, ucontext_t.uc_mcontext->ss.srr0, ucontext_t.uc_mcontext->es.dar, ucontext_t.uc_mcontext.psw], , ,[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif#ifdef HAVE_SYS_REG_H# include <sys/reg.h>#endif#ifdef HAVE_SYS_PARAM_H# include <sys/param.h>#endif#ifdef HAVE_SYS_USER_H# include <sys/user.h>#endif#if defined(__x86_64__) && defined(__linux__)# include "x86_64-ucontext.h"#else# if (defined(__arm) || defined(__arm__)) && defined(__linux__)# include "arm-ucontext.h"# else# ifdef HAVE_UCONTEXT_H# include <ucontext.h># endif# endif#endif])dnlfiif test "${ac_cv_type_sigcontext_t}" = yesthen AC_CHECK_MEMBERS([sigcontext_t.sc_pc, sigcontext_t.sigc_pc, sigcontext_t.sc_ir, sigcontext_t.sc_rip, sigcontext_t.sc_eip, sigcontext_t.sc_jmpbuf, sigcontext_t.sc_regs, sigcontext_t.sregs, sigcontext_t.eip, sigcontext_t.rip, sigcontext_t.arm_pc, sigcontext_t.sc_traparg_a0, sigcontext_t.fault_address, sigcontext_t.cr2], , ,[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnlfiif test "${ac_cv_type_struct_sigcontext}" = yesthen AC_CHECK_MEMBERS([struct sigcontext.sc_pc, struct sigcontext.sigc_pc, struct sigcontext.sc_ir, struct sigcontext.sc_rip, struct sigcontext.sc_eip, struct sigcontext.sc_jmpbuf, struct sigcontext.sc_regs, struct sigcontext.sregs, struct sigcontext.eip, struct sigcontext.rip, struct sigcontext.arm_pc, struct sigcontext.sc_traparg_a0, struct sigcontext.fault_address, struct sigcontext.cr2], , ,[#ifdef HAVE_SIGNAL_H# include <signal.h>#endif])dnlfidnldnl For STACK_DIRECTION._AC_LIBOBJ_ALLOCACF_STACK_ORDERdnl Checks for library functions.AC_FUNC_MMAPAC_CHECK_FUNCS([fsync])dnlAC_CHECK_FUNCS([memcpy bcopy], break)dnlAC_CHECK_FUNCS([siglongjmp longjmp], break)dnlAC_CHECK_FUNCS([perror strerror sys_errlist _sys_errlist], break)dnlAC_CHECK_FUNCS([psignal strsignal sys_siglist _sys_siglist], break)dnlAC_CHECK_FUNCS([sigaction])dnlAC_CHECK_FUNCS([atexit getpagesize memmove memset strdup])dnldnlAC_CHECK_FUNCS([backtrace])dnlAC_CHECK_DECLS([errno], , ,[#ifdef HAVE_ERRNO_H# INCLUDE <errno.h>#endif])dnl No, it's not a function, but . . .if test "${enable_warnings}" = yes; then CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}" EXTRA_CFLAGS=fiAC_CONFIG_FILES(Makefile)dnlAC_OUTPUT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -