📄 configure.ac
字号:
# -*- Autoconf -*-# Process this file with autoconf to produce a configure script.AC_PREREQ(2.57)AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)AM_INIT_AUTOMAKE(tdx_data,2.0.2)AC_CONFIG_SRCDIR([src/tdx_data.cpp])AM_CONFIG_HEADER(config.h)#AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]AX_PREFIX_CONFIG_H([hbstock_dso_config_inner.h],[HBSTOCK_DSO])#echo "CXXFLAGS:$CXXFLAGS"#echo "CFLAGS:$CFLAGS"if test "X$CXXFLAGS" = "X"; then CXXFLAGS=-O2 AC_SUBST(CXXFLAGS) fiif test "X$CFLAGS" = "X"; then CFLAGS=-O2 AC_SUBST(CFLAGS)fi# Checks for programs.AC_PROG_CCAC_PROG_CXXAC_PROG_CPPAM_PROG_CC_STDCAC_C_CONSTAM_GNU_GETTEXT([external])#AC_DISABLE_STATICAC_LIBTOOL_WIN32_DLLAC_PROG_LIBTOOL# Checks for libraries.# Checks for header files.#echo "host:$host"HOST_FLAG=case "$host" in*-*-cygwin* ) HOST_FLAG=-D_CYGWIN_ ;;*-*-mingw* ) HOST_FLAG=-D_MINGW32_ ;;esacAC_SUBST(HOST_FLAG)AM_CONDITIONAL(MINGW32, test x$HOST_FLAG = x-D_MINGW32_)test_program_path(){ iCount=$# if test $iCount -ne 3 then AC_MSG_ERROR([*** test_program_path must have 3 parameter: (program_name,default_path,test_file) ****]) return 1 fi prg_name=$1 prg_default_path=$2 test_file=$3 AC_MSG_NOTICE([$prg_name default path is '$prg_default_path']) prg_dir="/opt/$prg_name /usr/local /usr/local/$prg_name /usr" ret=0 if test ! -f "$prg_default_path/$test_file" then for dir in $prg_dir do if test -f "$dir/$test_file" then prg_default_path=$dir ret=0 AC_MSG_NOTICE([Found $prg_name in '$prg_default_path']) break else ret=1 fi done else AC_MSG_NOTICE([Found $prg_name in '$prg_default_path']) fi if test $ret -ne 0 then AC_MSG_ERROR([*** Library directory $prg_name does not exist.]) return 1 fi echo $prg_default_path return 0}############## start checking ace ##########################AC_ARG_WITH([ace],AC_HELP_STRING([--with-ace],[use ace (default is Yes)]),[ACE_PATH=$withval],[ACE_PATH=no])prg_name=acedefault_path=$ACE_PATHtest_file=/include/ace/OS.hACE_ROOT_PATH=`test_program_path "$prg_name" "$default_path" "$test_file"`AC_SUBST(ACE_ROOT_PATH)############## The end of checking ace ########################## ############## start checking hbstock ##########################AC_ARG_WITH([hbstock],AC_HELP_STRING([--with-hbstock],[use hbstock (default is Yes)]),[HBSTOCK_PATH=$withval],[HBSTOCK_PATH=no])prg_name=hbstockdefault_path=$HBSTOCK_PATHtest_file=/include/hbstock2/hbstock_exception.hHBSTOCK_ROOT_PATH=`test_program_path "$prg_name" "$default_path" "$test_file"`AC_SUBST(HBSTOCK_ROOT_PATH)############## The end of checking hbstock ######################################## start checking cppunit ##########################AC_ARG_WITH([cppunit],AC_HELP_STRING([--with-cppunit],[use cppunit (default is Yes)]),[CPPUNIT_PATH=$withval],[CPPUNIT_PATH=no])prg_name=cppunitdefault_path=$CPPUNIT_PATHtest_file=/include/cppunit/TestSuite.hCPPUNIT_ROOT_PATH=`test_program_path "$prg_name" "$default_path" "$test_file"`AC_SUBST(CPPUNIT_ROOT_PATH)#echo "CPPUNIT_ROOT_PATH : $CPPUNIT_ROOT_PATH"AM_CONDITIONAL(CPPUNIT, test ! x$CPPUNIT_ROOT_PATH = x)############## The end of checking cppunit ##########################AC_OUTPUT(Makefile bin/Makefile src/Makefile test/Makefile po/Makefile.in)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -