📄 aclocal.m4
字号:
# aclocal.m4 generated automatically by aclocal 1.6.2 -*- Autoconf -*-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002# Free Software Foundation, Inc.# This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY, to the extent permitted by law; without# even the implied warranty of MERCHANTABILITY or FITNESS FOR A# PARTICULAR PURPOSE.# serial 4AC_DEFUN(mfx_CUSTOMIZE,[mfx_PROG_CC_BUG_SIGNED_TO_UNSIGNED_CASTINGmfx_PROG_GCC_BUG_SCHEDULE_INSNSmfx_PROG_GCC_BUG_STRENGTH_REDUCEdnl /***********************************************************************dnl // Prepare some macrosdnl ************************************************************************/CFLAGS_GCC_OMIT_FRAME_POINTER=""if test "X$GCC" = Xyes; then CFLAGS_GCC_OMIT_FRAME_POINTER="-fomit-frame-pointer" if test "X$mfx_cv_prog_checkergcc" = Xyes; then CFLAGS_GCC_OMIT_FRAME_POINTER="-fno-omit-frame-pointer" fi if test "X$enable_debug" = Xyes; then CFLAGS_GCC_OMIT_FRAME_POINTER="-fno-omit-frame-pointer" fi if test "X$enable_profiling" = Xyes; then CFLAGS_GCC_OMIT_FRAME_POINTER="-fno-omit-frame-pointer" fi if test "X$enable_coverage" = Xyes; then CFLAGS_GCC_OMIT_FRAME_POINTER="-fno-omit-frame-pointer" fifiAC_SUBST(CFLAGS_GCC_OMIT_FRAME_POINTER)dnlif test "X$enable_debug" = Xyes; then if test "X$GCC" = Xyes -a "X$USE_MAINTAINER_MODE" = Xyes; then test "$ac_cv_prog_cc_g" = yes && CFLAGS="$CFLAGS -g" test "$ac_cv_prog_cxx_g" = yes && CXXFLAGS="$CXXFLAGS -g" else test "$ac_cv_prog_cc_g" = yes && CFLAGS="$CFLAGS -g" test "$ac_cv_prog_cxx_g" = yes && CXXFLAGS="$CXXFLAGS -g" fifidnl /***********************************************************************dnl // Compiler and architecture for use in makefilesdnl ************************************************************************/AC_SUBST(MFX_CC)AC_SUBST(MFX_ARCH)AC_SUBST(MFX_CPU)MFX_CC="unknown"MFX_ARCH="unknown"MFX_CPU="$host_cpu"if test "X$cross_compiling" = Xyes; then if test "X$build" = "X$host"; then MFX_CPU="unknown" fifiMFX_CPU=`echo "$MFX_CPU" | sed -e 's/[^a-zA-Z0-9]//g'`if test "X$GCC" = Xyes; then MFX_CC="GCC" if test "X$enable_debug" = Xyes; then CFLAGS="$CFLAGS -O0" else CFLAGS="$CFLAGS -O2" fi CFLAGS="$CFLAGS -Wall -Wcast-align -Wcast-qual -Wwrite-strings" case $MFX_CPU in i[[3456789]]86) MFX_ARCH="i386" mfx_unaligned_ok_2="yes" mfx_unaligned_ok_4="yes" CFLAGS="$CFLAGS -fno-strength-reduce" ;; *) if test "X$mfx_cv_prog_gcc_bug_strength_reduce" = Xyes; then CFLAGS="$CFLAGS -fno-strength-reduce" fi ;; esac if test "X$mfx_cv_prog_gcc_bug_schedule_insns" = Xyes; then CFLAGS="$CFLAGS -fno-schedule-insns -fno-schedule-insns2" fifiif test "X$GCC" = Xyes; thenAC_CACHE_CHECK([whether ${CC-cc} accepts -fstrict-aliasing],mfx_cv_prog_gcc_f_strict_aliasing,[echo 'extern int x; int x = 0;' > conftest.ccif test -z "`${CC-cc} -fstrict-aliasing -c conftest.cc 2>&1`"; then mfx_cv_prog_gcc_f_strict_aliasing=yeselse mfx_cv_prog_gcc_f_strict_aliasing=nofirm -f conftest*])if test "X$mfx_cv_prog_gcc_f_strict_aliasing" = Xyes; then CFLAGS="$CFLAGS -fstrict-aliasing"fifiMFX_ARCH=`echo "$MFX_ARCH" | sed -e 's/[^a-zA-Z0-9]//g'`AC_DEFINE_UNQUOTED(MFX_ARCH,"$MFX_ARCH")AC_DEFINE_UNQUOTED(MFX_CPU,"$MFX_CPU")])# serial 1AC_DEFUN(mfx_PROG_CC_BUG_SIGNED_TO_UNSIGNED_CASTING,[AC_REQUIRE([AC_PROG_CC])dnlAC_REQUIRE([AC_PROG_CPP])dnlAC_CACHE_CHECK([whether signed to unsigned casting is broken],mfx_cv_prog_cc_bug_signed_to_unsigned_casting,[AC_TRY_COMPILE([], [#undef SIGNED#if defined(__STDC__) || defined(__cplusplus)#define SIGNED signed#else#define SIGNED#endifchar x[1 - 2 * ( (int)((unsigned char)((SIGNED char) -1)) != 255 )];],mfx_cv_prog_cc_bug_signed_to_unsigned_casting=no,mfx_cv_prog_cc_bug_signed_to_unsigned_casting=yes)])])# serial 1AC_DEFUN(mfx_PROG_GCC_BUG_SCHEDULE_INSNS,[AC_REQUIRE([AC_PROG_CC])dnlAC_REQUIRE([AC_PROG_CPP])dnlif test "$ac_cv_prog_gcc" = yes; thenmfx_save_cflags="$CFLAGS"CFLAGS="-O2 -fschedule-insns -fschedule-insns2"AC_CACHE_CHECK([whether ${CC-cc} suffers the -fschedule-insns bug],mfx_cv_prog_gcc_bug_schedule_insns,[AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[/* gcc schedule-insns optimization bug on RS6000 platforms. * Adapted from bug-report by Assar Westerlund <assar@sics.se> * Compile and run it using gcc -O2 -fno-schedule-insns and * gcc -O2 -fschedule-insns. */ const int clone[] = {1, 2, 0}; const int *q; q = clone; exit(*q ? 0 : 1);]])],[mfx_cv_prog_gcc_bug_schedule_insns=no],[mfx_cv_prog_gcc_bug_schedule_insns=yes],[mfx_cv_prog_gcc_bug_schedule_insns=unknown])])CFLAGS="$mfx_save_cflags"fi])# serial 1AC_DEFUN(mfx_PROG_GCC_BUG_STRENGTH_REDUCE,[AC_REQUIRE([AC_PROG_CC])dnlAC_REQUIRE([AC_PROG_CPP])dnlif test "$ac_cv_prog_gcc" = yes; thenmfx_save_cflags="$CFLAGS"CFLAGS="-O2 -fstrength-reduce"AC_CACHE_CHECK([whether ${CC-cc} suffers the -fstrength-reduce bug],mfx_cv_prog_gcc_bug_strength_reduce,[AC_TRY_RUN([/* gcc strength-reduce optimization bug on Intel platforms. * Adapted from bug-report by John E. Davis <davis@space.mit.edu> * Compile and run it using gcc -O2 -fno-strength-reduce and * gcc -O2 -fstrength-reduce. */int a[3]; unsigned an = 3;int strength_reduce_bug();int main() { unsigned j; for (j = 0; j < an; j++) a[j] = (int)j - 3; return strength_reduce_bug(); }int strength_reduce_bug(){ return a[0] != -3 || a[1] != -2 || a[2] != -1; }],[mfx_cv_prog_gcc_bug_strength_reduce=no],[mfx_cv_prog_gcc_bug_strength_reduce=yes],[mfx_cv_prog_gcc_bug_strength_reduce=unknown])])CFLAGS="$mfx_save_cflags"fi])AC_DEFUN(mfx_CHECK_CROSS,[AC_REQUIRE([AC_PROG_CC])if test "X$cross_compiling" = Xyes; then if test "X$build" = "X$host"; then AC_MSG_ERROR([you are cross compiling - please use the \`--host=' option]) fifi])# serial 2# @defmac mfx_PROG_CC_ANSI# @maindex PROG_CC_ANSI# @ovindex CC# If the C compiler in not in ANSI C mode by default, try to add an option# to output variable @code{CC} to make it so. This macro tries various# options that select ANSI C on some system or another. It considers the# compiler to be in ANSI C mode if it handles function prototypes correctly.## If you use this macro, you should check after calling it whether the C# compiler has been set to accept ANSI C; if not, the shell variable# @code{mfx_cv_prog_cc_ansi} is set to @samp{no}. If you wrote your source# code in ANSI C, you can make an un-ANSIfied copy of it by using the# program @code{ansi2knr}, which comes with Ghostscript.# @end defmacAC_DEFUN(mfx_PROG_CC_ANSI,[AC_REQUIRE([AC_PROG_CC])dnlAC_BEFORE([$0], [AC_C_INLINE])dnlAC_BEFORE([$0], [AC_C_CONST])dnldnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, requirednl a magic option to avoid problems with ANSI preprocessor commandsdnl like #elif.AC_BEFORE([$0], [AC_PROG_CPP])AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])AC_CACHE_VAL(mfx_cv_prog_cc_ansi,[mfx_cv_prog_cc_ansi=noac_save_CC="$CC"# Don't try gcc -ansi; that turns off useful extensions and# breaks some systems' header files.# AIX -qlanglvl=ansi# Ultrix and OSF/1 -std1# HP-UX 10.20 and later -Ae# HP-UX older versions -Aa -D_HPUX_SOURCE# SVR4 -Xc -D__EXTENSIONS__for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"do CC="$ac_save_CC $ac_arg" AC_TRY_COMPILE([#include <sys/types.h>#if !defined(NO_STDIO_H)#include <sys/stat.h>#include <stdio.h>#endif#include <stdarg.h>#include <stddef.h>#include <stdlib.h>#include <string.h># include <limits.h> /* note the space */#if defined(NO_STDIO_H)typedef struct { int dummy; } FILE;struct stat;#endif#if 1 && !defined(UINT_MAX)# error "this is an error"# include "choke me"#elif 0 || !defined(UINT_MAX)# error "this is an error"# include "choke me"#elif !defined(UINT_MAX)# error "this is an error"# include "choke me"#elif !(1-1)/* ok */#else# error "this is an error"# include "choke me"#endif#define STRINGIZE(x) #x#define MACRO_EXPAND(x) STRINGIZE(x)extern volatile signed char flag;extern char *s ( void );char *s ( void ){ static char n[] = MACRO_EXPAND(UINT_MAX); return flag ? n : n + 1;}/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */struct buf { int x; };FILE * (*rcsopen) (struct buf *, struct stat *, int);static char *e (char **p, int i){ return p[i];}static char *f (char * (*g) (char **, int), char **p, ...){ char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s;}int test (int i, double x);struct s1 {int (*f) (int a);};struct s2 {int (*f) (double a);};int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);int argc;char **argv;], [return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];],[mfx_cv_prog_cc_ansi="$ac_arg"; break])doneCC="$ac_save_CC"])if test -z "$mfx_cv_prog_cc_ansi"; then AC_MSG_RESULT([none needed])else AC_MSG_RESULT($mfx_cv_prog_cc_ansi)ficase "x$mfx_cv_prog_cc_ansi" in x|xno) ;; *) CC="$CC $mfx_cv_prog_cc_ansi" ;;esac])# Do all the work for Automake. -*- Autoconf -*-# This macro actually does too much some checks are only needed if# your package does certain things. But this isn't really a big deal.# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002# Free Software Foundation, Inc.# This program 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, or (at your option)# any later version.# This program 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 this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA# 02111-1307, USA.# serial 8# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be# written in clear, in which case automake, when reading aclocal.m4,# will think it sees a *use*, and therefore will trigger all it's# C support machinery. Also note that it means that autoscan, seeing# CC etc. in the Makefile, will ask for an AC_PROG_CC use...AC_PREREQ([2.52])# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow# the ones we care about.m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])# AM_INIT_AUTOMAKE([OPTIONS])# -----------------------------------------------# The call with PACKAGE and VERSION arguments is the old style# call (pre autoconf-2.50), which is being phased out. PACKAGE# and VERSION should now be passed to AC_INIT and removed from# the call to AM_INIT_AUTOMAKE.# We support both call styles for the transition. After# the next Automake release, Autoconf can make the AC_INIT# arguments mandatory, and then we can depend on a new Autoconf# release and drop the old call support.AC_DEFUN([AM_INIT_AUTOMAKE],[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl# test to see if srcdir already configuredif test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first])fi# Define the identity of the package.dnl Distinguish between old-style and new-style calls.m4_ifval([$2],[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])],[_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl_AM_IF_OPTION([no-define],,[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl# Some tools Automake needs.AC_REQUIRE([AM_SANITY_CHECK])dnlAC_REQUIRE([AC_ARG_PROGRAM])dnlAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -