⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 asn格式文件的编译器
💻 IN
字号:
dnldnl Copyright (c) 2001 Institute for Information Industry, Taiwan, Republic of China dnl Written by mangelo@users.sourceforge.netdnl 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://iiiasn1.sourceforge.net'.dnlAC_INITAC_CONFIG_AUX_DIR(config)AC_CANONICAL_SYSTEMAM_INIT_AUTOMAKE(iiiasn1, 2_12)dnl dnl Choose the correct C++ compiler tool setting.dnldnl If the subdirecotry "config" contains a file with the pattern dnl mh-$host_alias, then use the definition of CC CXX CPP CXXCPP dnl RANLIB LDFLAGS CFLAGS CXXFLAGS CPPFLAGS from that file, otherwisednl use AC_PROG_CXX and AC_PROG_RANLIB to find a suitable setting.dnlIII_CROSS_TOOLSdnl dnl Generate config.hdnl AM_CONFIG_HEADER(config.h)dnldnl Checks whether the environment variable CPLUS_INCLUDE_PATH work correctlydnl This is bug specific to cygwin 1.3.xdnlIII_CHECK_CXX_INCLUDE_PATHdnldnl Check if the compiler support namespace dnlAC_CXX_NAMESPACESdnldnl Check if STL is presentdnlAC_CXX_HAVE_STLif test "$ac_cv_cxx_have_stl" = no; then	AC_MSG_ERROR(This compiler does not have STL)fiif test  "$ac_cv_cxx_namespaces" = no; then	AC_MSG_ERROR(This compiler does not support namespace)fidnldnl check whether the STL is stlportdnlIII_CHECK_STLPORTdnldnl Enable multithread support or notdnlAC_ARG_ENABLE(thread, [  --enable-thread         enable thread support (default if using stlport)  --disable-thread        disable thread support (default otherwise)], [  iii_cv_enable_thread=$enableval], [        if test x"$iii_cv_have_stlport" = xno; then                iii_cv_enable_thread=no        else                iii_cv_enable_thread=yes        fi])if test x"$iii_cv_enable_thread" = xyes && test "$host_os" != cygwin; then    dnl check the existence of Pthread Library	ACX_PTHREAD([ 		LIBS="$PTHREAD_LIBS $LIBS"        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"	],[		AC_MSG_WARN([Pthread not found, no compiler and linker flags for multithread are specified])	])fi if test x"$iii_cv_enable_thread" = xyes ; then  III_ENABLE_STL_THREADelse  AC_DEFINE(BOOST_NO_MT, , [disable multithreading for boost/pool])fidnldnl Enable custom memory manager or notdnlAC_ARG_ENABLE(allocator, [  --enable-allocator         enable custom memory allocator (default)  --disable-allocator        disable custom memory allocator], [  iii_cv_enable_allocator=$enableval], [  if test "$host_os" != cygwin; then  	iii_cv_enable_allocator=yes  else    iii_cv_enable_allocator=no  fi])if test x"$iii_cv_enable_allocator" = xyes; then  AC_CACHE_CHECK([whether the compiler supports boost/pool Library],    iii_cv_boost_pool, [		AC_LANG_SAVE		AC_LANG_CPLUSPLUS		AC_TRY_COMPILE([			#include <boost/pool/singleton_pool.hpp>			struct Tag {};		],[			void* p = boost::singleton_pool<Tag,sizeof(int)>::malloc();			boost::singleton_pool<Tag,sizeof(int)>::free(p);			return 0;		], [			iii_cv_boost_pool=yes			], [			iii_cv_boost_pool=no			])		AC_LANG_RESTORE	])	if test x"$iii_cv_boost_pool" = xyes; then		AC_DEFINE(ASN1_ALLOCATOR, ,[enable custom memory manager])	else		AC_MSG_WARN([This compiler does not support boost/pool Library, custom memory manager disabled])		iii_cv_enable_allocator=no	fifidnldnl dnl AC_ARG_WITH(asnh323, [  --with-asnh323       build libasnh323.a (default)  --without-asnh323    do not build libasnh323.a], [  iii_cv_with_asnh323=$enableval], [  iii_cv_with_asnh323=yes])if test x"$iii_cv_with_asnh323" = xyes; then  asnh323dir=asnh323fidnldnl If using GNU stdc++ library, without defineing __THROW_BAD_ALLOC, it woulddnl link "cerr", which is undesirable when iostream is not to be used.dnlif test x"$ac_cv_prog_gxx" = xyes && test x"$iii_cv_have_stlport" = xno ; then# assume using libstdc++, avoid linking cerr		AC_TRY_RUN([			#include <vector>			int main(){			#ifndef __THROW_BAD_ALLOC			return 0;			#else			return 1;			#endif			}		], [			AC_DEFINE(__THROW_BAD_ALLOC, ,[throw std::bad_alloc when memory is exhausted])			])fidnldnl Test if the new style iostream is presentdnlAC_CXX_HAVE_NEW_IOSTREAMdnldnl Test if the wstring is presentdnldnl In GNU stdc++ library, the wstring is not turn on by default,dnl you have to modify <string> to uncommnet the line dnl "typedef basic_string<wchar_t> wstring;"  dnlAC_CXX_HAVE_WSTRINGif test "$ac_cv_cxx_have_wstring" = no; then	AC_MSG_ERROR(This compiler does not have a working wstring)fidnl dnl Let user choose if AVN should be supporteddnlAC_ARG_ENABLE(avn, [  --enable-avn            enable AVN support (default)  --disable-avn           disable AVN support], [	if test "$enableval" = yes && test "$ac_cv_cxx_have_new_iostream" = no; then		AC_MSG_WARN([The compiler does not support new iostream, disable AVN])		enable_avn=no	fi],[ enable_avn=$ac_cv_cxx_have_new_iostream ] )if test x"$ac_cv_cxx_have_new_iostream" = xyes; then	AC_DEFINE(ASN1_HAS_IOSTREAM, , [enable AVN support])fidnldnl Specify the directory where Boost Libraray is located  dnl AC_ARG_WITH(boost, [  --with-boost=[boost-dir]  specify the directory where BOOST library is located  ], [ CPPFLAGS = "$CPPFLAGS -I$withval"])dnldnl If GNU C is used, append -pipe compiler optiondnlif test "$ac_cv_prog_gxx" = yes; then	PIPEFLAG=-pipefiAC_SUBST(LIBSTL)AC_SUBST(PIPEFLAG)AC_SUBST(asnh323dir)builddir=`pwd`ASNPARSER=$builddir/asnparser/asnparserAC_SUBST(ASNPARSER)dnldnl dnl AC_ARG_ENABLE(debug,[  --enable-debug     Turn on debugging],[debug="${enableval}"],[debug=no])if test "x${debug}" = xyes ; thenCXXFLAGS="-g"DEBUGFLAG="-D_DEBUG"elseDEBUGFLAG="-DNDEBUG"fiAC_SUBST(DEBUGFLAG)dnldnl Output Makefile.dnlAC_OUTPUT(Makefile asnparser/Makefile asn1/Makefile asn1/testsuite/Makefile asnh323/Makefile asnh323/testsuite/Makefile)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -