📄 configure.in
字号:
dnl ######################################################################dnldnl $Id: configure.in,v 1.6 2003/05/08 05:05:41 t Exp $dnl Copyright (c) 2000, Makino Takakidnldnl Name: configure.indnl Purpose: Script for autoconfdnldnl ######################################################################dnl Process this file with autoconf to produce a configure script.dnl ######################################################################AC_INIT(src/func.cpp)AM_INIT_AUTOMAKE(punnets, 1.0a)AC_CANONICAL_HOSTif test "$CYGWIN" = yes; then AC_DEFINE(USE_CYGWIN, 1, [Defined in CYGWIN environment])fiCPPFLAGS=" -I/usr/local/include "dnl ######################################################################dnl Checks for programs.AC_PROG_CCAC_PROG_CPPAC_PROG_CXXAC_PROG_CXXCPPAC_PATH_PROG(DOXYGEN, doxygen$EXEEXT, nocommand)if test "$DOXYGEN" != nocommand; then AC_SUBST(DOXYOUTPUT, "\$(builddir)/html/index.html")else AC_SUBST(DOXYOUTPUT, "")fidnl ########################################dnl The following programs should bednl found with c++ compiler.AC_LANG_CPLUSPLUSAC_PROG_INSTALLAC_PROG_MAKE_SETAC_PROG_RANLIBdnl ######################################################################dnl Checks for libraries.dnl ########################################dnl The following libraries should bednl found with c++ compiler.AC_LANG_CPLUSPLUSdnl ######################################################################dnl Checks for header files.dnl ########################################dnl The following libraries should bednl found with c++ compiler.AC_HEADER_STDCAC_CHECK_HEADERS(vector map string,,[AC_ERROR([Mandatory header file is missing])])AC_CHECK_HEADERS(math.h hash_map ext/hash_map)dnl ########################################dnl The following characteristics shoulddnl be detected with c++ compilerAC_LANG_CPLUSPLUSAC_TYPE_SIZE_TCXXFLAGS_TMP="$CXXFLAGS"CXXFLAGS_ADD=""AC_SUBST(CXXFLAGS_ADD)CXXFLAGS=-fstrict-aliasingAC_CACHE_CHECK(whether $CXX accepts -fstrict-aliasing, ac_cv_prog_cxx_strict_aliasing,[AC_TRY_COMPILE([#include <iostream.h>],[{ cout << "hello, world"; }], ac_cv_prog_cxx_strict_aliasing=yes, ac_cv_prog_cxx_strict_aliasing=no)])if test "$ac_cv_prog_cxx_strict_aliasing" = yes; then CXXFLAGS_ADD="$CXXFLAGS_ADD -fstrict-aliasing"fiCXXFLAGS=-ffast-mathAC_CACHE_CHECK(whether $CXX accepts -ffast-math, ac_cv_prog_cxx_fastmath,[AC_TRY_COMPILE([#include <math.h>],[{ double d = sqrt(3.0)*4.0; return (int)d; }], ac_cv_prog_cxx_fastmath=yes, ac_cv_prog_cxx_fastmath=no)])if test "$ac_cv_prog_cxx_fastmath" = yes; then CXXFLAGS_ADD="$CXXFLAGS_ADD -ffast-math"fiCXXFLAGS=-fomit-frame-pointerAC_CACHE_CHECK(whether $CXX accepts -fomit-frame-pointer, ac_cv_prog_cxx_omitfp,[AC_TRY_COMPILE([#include <math.h>],[{ double d = sqrt(3.0)*4.0; return (int)d; }], ac_cv_prog_cxx_omitfp=yes, ac_cv_prog_cxx_omitfp=no)])if test "$ac_cv_prog_cxx_omitfp" = yes; then CXXFLAGS_ADD="$CXXFLAGS_ADD -fomit-frame-pointer"fiCXXFLAGS="-W -Wall"AC_CACHE_CHECK(whether $CXX accepts -W -Wall, ac_cv_prog_cxx_wall,[AC_TRY_COMPILE([#include <iostream>],[{ std::cout << "hello, world"; }], ac_cv_prog_cxx_wall=yes, ac_cv_prog_cxx_wall=no)])if test "$ac_cv_prog_cxx_wall" = yes; then CXXFLAGS_ADD="$CXXFLAGS_ADD -W -Wall"fiCXXFLAGS="$CXXFLAGS_TMP$CXXFLAGS_ADD"dnl ######################################################################dnl Checks for compiling options.AC_ARG_ENABLE(prof, [ --enable-prof enable profiling (no or 0-5) [default 1]],, enable_prof=1)AC_MSG_CHECKING(whether to enable profiling)if test "$enable_prof" = no; then AC_MSG_RESULT(no)elif test 0 -le $enable_prof -a $enable_prof -le 5; then AC_MSG_RESULT($enable_prof) AC_DEFINE_UNQUOTED(PROFILE, $enable_prof, [Profiling level])else AC_MSG_RESULT($enable_prof) AC_WARN(profiling value is invalid)fisubdirs=""if test -d ${srcdir}/maklib -o -d ./maklib; then subdirs="maklib $(subdirs)" LDFLAGS=-L$(builddir)/maklibelse LDFLAGS=-L/usr/local/lib AC_CHECK_HEADERS(mak/maxmin.h,,[AC_ERROR(maklib is necessary)]) AC_CHECK_LIB(mak,main,,[AC_ERROR(maklib is necessary)])fiAC_SUBST(SUBDIRS, $subdirs)dnl ######################################################################dnl Finish...AC_PREFIX_DEFAULT(/usr/local)AM_CONFIG_HEADER(include/punnets/config_punnets.h)AC_CONFIG_SUBDIRS(maklib)AC_OUTPUT([Makefile include/Makefile include/punnets/Makefile src/Makefile punnets.doxygen])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -