📄 aclocal.m4
字号:
# 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 5AC_PREREQ(2.52)# AM_CONDITIONAL(NAME, SHELL-CONDITION)# -------------------------------------# Define a conditional.AC_DEFUN([AM_CONDITIONAL],[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnlAC_SUBST([$1_TRUE])AC_SUBST([$1_FALSE])if $2; then $1_TRUE= $1_FALSE='#'else $1_TRUE='#' $1_FALSE=fiAC_CONFIG_COMMANDS_PRE([if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional \"$1\" was never defined.Usually this means the macro was only invoked conditionally.])fi])])dnldnl Copyright (c) 2001 Institute for Information Industry, Taiwan, Republic of China dnl Written by angelo@iii.org.twdnl dnl This file is part of III ASN.1 Tool.dnl dnl The contents of this file are subject to the Mozilla Public Licensednl Version 1.0 (the "License"); you may not use this file except indnl compliance with the License. You may obtain a copy of the License atdnl http://www.mozilla.org/MPL/dnldnl Software distributed under the License is distributed on an "AS IS"dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Seednl the License for the specific language governing rights and limitationsdnl under the License.dnl dnl III ASN.1 Tool is the ASN.1 to C++ compiler which transforms ASN.1 Modulednl to C++ codes along with the C++ run time library for encoding and decoding dnl ASN.1 types. For details, see the III ASN.1 Tool World-Wide-Web page, dnl `http://www.iii.org.tw/portal/lab1/asn1tool.html'.dnldnl @synopsis III_CHECK_CROSS_SETTING(VARIABLE, HOST_FILE)dnldnl Choose the correct VARIABLE setting from HOST_FILEdnldnl @author Huang-Ming HuangAC_DEFUN(III_CHECK_CROSS_SETTING,[ if test -z "[$]$1"; then xx=`sed -n -e 's/^[[:blank:]]*$1[[:blank:]]*=[[:blank:]]*\(.*\)$/\1/p' < $2` if test -n "${xx}" ; then $1=$xx fi fi])dnl @synopsis III_CROSS_TOOLSdnldnl Choose the correct C++ compiler tool settings.dnldnl If the subdirecotry "config" contains a file with the patterndnl mh-$host_alias, then use the definition of CC CXX dnl RANLIB LDFLAGS CFLAGS CXXFLAGS CPPFLAGS from that file, otherwisednl use AC_PROG_CXX and AC_PROG_RANLIB to find a suitable setting.dnldnl @author Huang-Ming HuangAC_DEFUN(III_CROSS_TOOLS,[if test -e $srcdir/config/mh-$host_alias ; then host_frag=$srcdir/config/mh-$host_alias III_CHECK_CROSS_SETTING(CC,${host_frag}) III_CHECK_CROSS_SETTING(CXX,${host_frag}) III_CHECK_CROSS_SETTING(RANLIB,${host_frag}) III_CHECK_CROSS_SETTING(CFLAGS,${host_frag}) III_CHECK_CROSS_SETTING(CXXFLAGS,${host_frag}) III_CHECK_CROSS_SETTING(CPPFLAGS,${host_frag}) III_CHECK_CROSS_SETTING(LDFLAGS,${host_frag}) if test "$host_alias" != "$build_alias" ; then ac_cv_prog_cc_cross=yes dnl prevent the AC_PROG_CXX from running the program produce by cross compiler ac_exeext=yyy else ac_cv_prog_cc_cross=no fifidnl Checks for programs.AC_CHECK_TOOL(CC, gcc)AC_PROG_CCAC_CHECK_TOOL(CXX, c++)AC_PROG_CXXAC_CHECK_TOOL(RANLIB, ranlib, :)AC_PROG_CPPAC_PROG_CXXCPP])# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-# Copyright 1996, 1997, 2000, 2001 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.AC_PREREQ([2.52])# serial 6# When config.status generates a header, we must update the stamp-h file.# This file resides in the same directory as the config header# that is generated. We must strip everything past the first ":",# and everything past the last "/".# _AM_DIRNAME(PATH)# -----------------# Like AS_DIRNAME, only do it during macro expansionAC_DEFUN([_AM_DIRNAME], [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, m4_if(regexp([$1], [^//\([^/]\|$\)]), -1, m4_if(regexp([$1], [^/.*]), -1, [.], patsubst([$1], [^\(/\).*], [\1])), patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl])# _AM_DIRNAME# The stamp files are numbered to have different names.# We could number them on a directory basis, but that's additional# complications, let's have a unique counter.m4_define([_AM_STAMP_Count], [0])# _AM_STAMP(HEADER)# -----------------# The name of the stamp file for HEADER.AC_DEFUN([_AM_STAMP],[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnlAS_ESCAPE(_AM_DIRNAME(patsubst([$1], [:.*])))/stamp-h[]_AM_STAMP_Count])# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)# ------------------------------------------------------------# We used to try to get a real timestamp in stamp-h. But the fear is that# that will cause unnecessary cvs conflicts.AC_DEFUN([_AM_CONFIG_HEADER],[# Add the stamp file to the list of files AC keeps track of,# along with our hook.AC_CONFIG_HEADERS([$1], [# update the timestampecho 'timestamp for $1' >"_AM_STAMP([$1])"$2], [$3])])# _AM_CONFIG_HEADER# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)# --------------------------------------------------------------AC_DEFUN([AM_CONFIG_HEADER],[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])])# AM_CONFIG_HEADERdnldnl Copyright (c) 2001 Institute for Information Industry, Taiwan, Republic of China dnl Written by angelo@iii.org.twdnl dnl This file is part of III ASN.1 Tool.dnl dnl The contents of this file are subject to the Mozilla Public Licensednl Version 1.0 (the "License"); you may not use this file except indnl compliance with the License. You may obtain a copy of the License atdnl http://www.mozilla.org/MPL/dnldnl Software distributed under the License is distributed on an "AS IS"dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Seednl the License for the specific language governing rights and limitationsdnl under the License.dnl dnl III ASN.1 Tool is the ASN.1 to C++ compiler which transforms ASN.1 Modulednl to C++ codes along with the C++ run time library for encoding and decoding dnl ASN.1 types. For details, see the III ASN.1 Tool World-Wide-Web page, dnl `http://www.iii.org.tw/portal/lab1/asn1tool.html'.dnldnl @synopsis III_CHECK_CXX_INCLUDE_PATHdnldnl Checks whether the environment variable CPLUS_INCLUDE_PATH work correctlydnl This is bug specific to cygwin 1.3.xdnldnl @author Huang-Ming HuangAC_DEFUN(III_CHECK_CXX_INCLUDE_PATH, [if test "$ac_cv_prog_gxx" = yes; thenAC_CACHE_CHECK([whether the environment variable CPLUS_INCLUDE_PATH work correctly], iii_cv_cplus_include_path, [AC_LANG_SAVE AC_LANG_CPLUSPLUS iii_cv_cplus_include_path_backup=${CPLUS_INCLUDE_PATH}export CPLUS_INCLUDE_PATH=.cat > vector << EOFyes_yes_yesEOFAC_EGREP_CPP(yes_yes_yes,[ #include <vector> ],iii_cv_cplus_include_path=yes,iii_cv_cplus_include_path=no)export CPLUS_INCLUDE_PATH=$iii_cv_cplus_include_path_backuprm vector])fiif test "$iii_cv_cplus_include_path" = no && test -n "$CPLUS_INCLUDE_PATH"; thenCPPFLAGS="`echo -I$CPLUS_INCLUDE_PATH | sed 's/:/ -I/g'` $CPPFLAGS"fi])dnl @synopsis AC_CXX_NAMESPACESdnldnl If the compiler can prevent names clashes using namespaces, definednl HAVE_NAMESPACES.dnldnl @version $Id: ac_cxx_namespaces.m4,v 1.1.1.1 2001/08/01 07:38:42 mangelo Exp $dnl @author Luc MaisonobednlAC_DEFUN([AC_CXX_NAMESPACES],[AC_CACHE_CHECK(whether the compiler implements namespaces,ac_cv_cxx_namespaces,[AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], [using namespace Outer::Inner; return i;], ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) AC_LANG_RESTORE])if test "$ac_cv_cxx_namespaces" = yes; then AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])fi])dnl @synopsis AC_CXX_HAVE_STLdnldnl If the compiler supports the Standard Template Library, define HAVE_STL.dnldnl @version $Id: ac_cxx_have_stl.m4,v 1.1.1.1 2001/08/01 07:38:42 mangelo Exp $dnl @author Luc MaisonobednlAC_DEFUN([AC_CXX_HAVE_STL],[AC_CACHE_CHECK(whether the compiler supports Standard Template Library,ac_cv_cxx_have_stl,[AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include <list>#include <deque>#ifdef HAVE_NAMESPACESusing namespace std;#endif],[list<int> x; x.push_back(5);list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;], ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no) AC_LANG_RESTORE])if test "$ac_cv_cxx_have_stl" = yes; then AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library])fi])dnldnl Copyright (c) 2001 Institute for Information Industry, Taiwan, Republic of China dnl Written by angelo@iii.org.twdnl dnl This file is part of III ASN.1 Tool.dnl dnl The contents of this file are subject to the Mozilla Public Licensednl Version 1.0 (the "License"); you may not use this file except indnl compliance with the License. You may obtain a copy of the License atdnl http://www.mozilla.org/MPL/dnldnl Software distributed under the License is distributed on an "AS IS"dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Seednl the License for the specific language governing rights and limitationsdnl under the License.dnl dnl III ASN.1 Tool is the ASN.1 to C++ compiler which transforms ASN.1 Modulednl to C++ codes along with the C++ run time library for encoding and decoding dnl ASN.1 types. For details, see the III ASN.1 Tool World-Wide-Web page, dnl `http://www.iii.org.tw/portal/lab1/asn1tool.html'.dnldnl @synopsis III_CHECK_STLPORTdnl dnl Check the existance of STLportdnldnl @author Huang-Ming HuangAC_DEFUN(III_CHECK_STLPORT, [ AC_BEFORE([$0],AC_CXX_HAVE_STL) if test "$ac_cv_cxx_have_stl" = yes; then AC_CACHE_CHECK(whether the STLport exists, iii_cv_have_stlport, [ AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_EGREP_CPP(yes,[ #include <vector> #ifdef __SGI_STL_PORT yes #endif ], iii_cv_have_stlport=yes, iii_cv_have_stlport=no) ] ) dnl dnl Choose the correct STL library to link with dnl if test "$host_os" = cygwin && test "$iii_cv_have_stlport" = yes ; then LIBSTL=-lstlport_cygwin elif test "$ac_cv_prog_gxx" = yes; then if test "$iii_cv_have_stlport" = yes; then LIBSTL=-lstlport_gcc else LIBSTL=-lstdc++ fi; fi else iii_cv_have_stlport=no fi])dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -