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

📄 configure.in

📁 Unix下的MUD客户端程序
💻 IN
字号:
dnl mcl - Mud Client for Unixdnl process this file with autoconf to produce a configure script.AC_REVISION($Revision: 1.7 $)AC_INIT(main.cc)AC_CONFIG_AUX_DIR(admin)mcl_major=0mcl_minor=52mcl_micro=97PACKAGE=mclVERSION=$mcl_major.$mcl_minor.$mcl_microMCL_VERSION1=$mcl_minor$mcl_microMCL_VERSION2=$mcl_major.$mcl_minor.$mcl_microAC_ARG_ENABLE(debug,  [  --enable-debug          enable debugging], DEBUG="$enable_debug")AC_ARG_ENABLE(efence, [  --enable-efence         enable electric fence malloc debugger], EFENCE="$enable_efence")AC_ARG_ENABLE(perl,   [  --enable-perl           enable perl scripting support], PERL="$enable_perl")AC_ARG_ENABLE(python, [  --enable-python         enable python scripting support], PYTHON="$enable_python")AC_ARG_WITH(install_root, [  --with-install-root     directory to consider as the install root [default=/]], INSTALL_ROOT="$with_install_root")dnl supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'if test -z "${CFLAGS}"; then	save_have_cflags="no"fidnl supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure'if test -z "${CXXFLAGS}"; then	save_have_cxxflags="no"fidnl supply default LDFLAGS, if not specified by `LDFLAGS=flags ./configure'if test -z "${LDFLAGS}"; then	save_have_ldflags="no"fidnl RulesAC_PROG_CCAC_PROG_CXXAC_PROG_INSTALLAC_CANONICAL_HOSTAC_PROG_LN_Sdnl librariesAC_CHECK_LIB(dl, main, [LIBDL="-ldl"], LIBDL=)AC_CHECK_LIB(m, main, [LIBM="-lm"], LIBM=)AC_CHECK_LIB(ncurses, main, [LIBNCURSES="-lncurses"], LIBNCURSES=)AC_CHECK_LIB(pthread, main, [LIBPTHREAD="-lpthread"], LIBPTHREAD=)AC_CHECK_LIB(z, main, [LIBZ="-lz"], LIBZ=)if test "x$save_have_cflags" = "xno"; then	CFLAGS="-O2"fiif test "x$save_have_cxxflags" = "xno"; then	CXXFLAGS="-O2"fiif test "x$save_have_ldflags" = "xno"; then	LDFLAGS="-s"fidnl debuggingif test "x$enable_debug" = "xyes"; then	CFLAGS="$CFLAGS -g"	CXXFLAGS="$CXXFLAGS -g"        LDFLAGS=fidnl electric fence malloc debuggercase "x$enable_efence" in	"xno")	LIBEFENCE=""	;;	"x")	LIBEFENCE=""	;;	"xyes")	AC_CHECK_LIB(efence, main, [LIBEFENCE="-lefence"], LIBEFENCE=)	if test "x$LIBEFENCE" = "x"; then		echo "could not find electric fence"		echo "malloc debugging support disabled"	fi	;;	*)	AC_CHECK_LIB(efence, main, [LIBEFENCE="-lefence"], LIBEFENCE=)	if test "x$LIBEFENCE" = "x"; then		echo "could not find electric fence"		echo "malloc debugging support disabled"	fi	;;esacdnl do we have perl installed in this system?case "x$enable_perl" in	"xyes")	AC_PATH_PROGS(PERL,perl5 perl,no)        ;;	"x")	AC_PATH_PROGS(PERL,perl5 perl,no)        ;;        "xno")	echo "perl scripting support disabled in command line"	WITH_PERL=""        ;;        *)	echo "using $enable_perl as the perl binary"        ;;esacif test "x$enable_perl != xno"; then	AC_MSG_CHECKING(for perl version)	$PERL -e 'require 5.004' > /dev/null 2>&1	if test $? -ne 0 ; then		echo "perl 5.004 (or greater) is required"                echo "disabling perl scripting support"                PERL="no"		WITH_PERL=""	else		perl_version=`$PERL -e 'print $]'`		AC_MSG_RESULT($perl_version)                PERL_CPPFLAGS=`$PERL -MExtUtils::Embed -e perl_inc`                PERL_LDFLAGS=`$PERL -MExtUtils::Embed -e ldopts | $PERL -pe 's/-l(gdbm|ndbm|posix|db)\b//g'`		WITH_PERL="perl"	fifidnl do we have python installed in this systemcase "x$enable_python" in	"xyes")	AC_PATH_PROGS(PYTHON,python python1.5 python1.4 python1.3,no)        ;;        "x")	AC_PATH_PROGS(PYTHON,python python1.5 python1.4 python1.3,no)        ;;        "xno")	echo "python scripting support disabled in command line"	WITH_PYTHON=""        ;;        *)	echo "using $enable_python as the python binary"        ;;esacif test "x$enable_python != xno"; then	dnl python {cpp,ld}flags	changequote(, )dnl	PYTHON_CPPFLAGS=`$PYTHON -c 'import sysprint "-I%s/include/python%s" % (sys.prefix, sys.version[:3])'`	PYTHON_LDFLAGS=`$PYTHON -c 'import sysprint "-L%s/lib/python%s/config -lpython%s" % (sys.prefix, sys.version[:3], sys.version[:3])'`	changequote([, ])dnl	WITH_PYTHON="python"else	WITH_PYTHON=""fidnl check if this system support the flag -fno-rttisave_CFLAGS="$CFLAGS"CFLAGS="-fno-rtti"AC_MSG_CHECKING(if the flag -fno-rtti is supported by the system compiler)AC_CACHE_VAL(ac_cv_flag_no_rtti,[AC_TRY_COMPILE([int a;],[int a;],ac_cv_flag_no_rtti=yes,ac_cv_flag_no_rtti=no)])AC_MSG_RESULT($ac_cv_flag_no_rtti)CFLAGS="$save_CFLAGS"case "x$ac_cv_flag_no_rtti" in	"xyes")        HAVE_FLAG_NO_RTTI="-fno-rtti"        ;;        "xno")        HAVE_FLAG_NO_RTTI=""        ;;        *)        HAVE_FLAG_NO_RTTI=""        dnl this should never happen        ;;esacdnl check if this system support the flag -fno-exceptionssave_CFLAGS="$CFLAGS"CFLAGS="-fno-exceptions"AC_MSG_CHECKING(if the flag -fno-exceptions is supported by the system compiler)AC_CACHE_VAL(ac_cv_flag_no_exceptions,[AC_TRY_COMPILE([int a;],[int a;],ac_cv_flag_no_exceptions=yes,ac_cv_flag_no_exceptions=no)])AC_MSG_RESULT($ac_cv_flag_no_exceptions)CFLAGS="$save_CFLAGS"case "x$ac_cv_flag_no_exceptions" in	"xyes")        HAVE_FLAG_NO_EXCEPTIONS="-fno-exceptions"        ;;        "xno")        HAVE_FLAG_NO_EXCEPTIONS=""        ;;        *)        HAVE_FLAG_NO_EXCEPTIONS=""        dnl this should never happen        ;;esaccase "$host" in	*-*-linux*)	LOCAL_CFLAGS="-Wall -pipe"	LOCAL_CPPFLAGS="-Ih"	LOCAL_CXXFLAGS="-W $LOCAL_CFLAGS"	dnl Which version of gcc and g++ are we using?	dnl if ((gcc > 2.7) && (g++ > 2.7)) we do not	dnl need to add even more compile flags	cat > conftest.c <<EOF#if __GNUC__ > 2	yes;#endif#if __GNUC__ > 1#if __GNUC_MINOR__ > 7	yes;#endif#endifEOF	ac_good_gcc_try='${CC-cc} -E conftest.c'	if eval "$ac_good_gcc_try" | egrep yes >/dev/null 2>&1; then		have_good_gcc=yes	fi		ac_good_gpp_try='${CXX-cc} -E conftest.c'	if eval "$ac_good_gpp_try" | egrep yes >/dev/null 2>&1; then		have_good_gpp=yes	fi	rm conftest.c	if test "x$have_good_gcc" = "xyes" -a "x$have_good_gpp" = "xyes"; then		LOCAL_LDFLAGS="-rdynamic"		LOCAL_LIBS=""	else		LOCAL_LDFLAGS="-nodefaultlibs -rdynamic"		LOCAL_LIBS="-lc -lgcc"	fi	;;	*)	LOCAL_CFLAGS=""	LOCAL_CPPFLAGS="-Ih"	LOCAL_CXXFLAGS="$LOCAL_CFLAGS"	LOCAL_LDFLAGS=""	LOCAL_LIBS=""	;;esacCOMPILED_BY=`whoami`@`uname -n`AC_PATH_PROG(RM,rm,true)AC_PATH_PROG(FIND,find,true)AC_PATH_PROG(XARGS,xargs,true)AC_PATH_PROG(CTAGS,ctags,true)AC_PATH_PROG(ECHO,echo,true)AC_SUBST(CFLAGS)AC_SUBST(CXXFLAGS)AC_SUBST(LDFLAGS)AC_SUBST(PACKAGE)AC_SUBST(MCL_VERSION1)AC_SUBST(MCL_VERSION2)AC_SUBST(INSTALL_ROOT)AC_SUBST(LIBDL)AC_SUBST(LIBEFENCE)AC_SUBST(LIBM)AC_SUBST(LIBNCURSES)AC_SUBST(LIBPTHREAD)AC_SUBST(LIBZ)AC_SUBST(PERL)AC_SUBST(PERL_CPPFLAGS)AC_SUBST(PERL_LDFLAGS)AC_SUBST(WITH_PERL)AC_SUBST(PYTHON)AC_SUBST(PYTHON_CPPFLAGS)AC_SUBST(PYTHON_LDFLAGS)AC_SUBST(WITH_PYTHON)AC_SUBST(HAVE_FLAG_NO_RTTI)AC_SUBST(HAVE_FLAG_NO_EXCEPTIONS)AC_SUBST(LOCAL_CFLAGS)AC_SUBST(LOCAL_CPPFLAGS)AC_SUBST(LOCAL_CXXFLAGS)AC_SUBST(LOCAL_LDFLAGS)AC_SUBST(LOCAL_LIBS)AC_SUBST(COMPILED_BY)AC_SUBST(RM)AC_SUBST(FIND)AC_SUBST(XARGS)AC_SUBST(CTAGS)AC_SUBST(ECHO)AC_SUBST(LOCAL_CFLAGS)AC_SUBST(LOCAL_CPPFLAGS)AC_SUBST(LOCAL_CXXFLAGS)AC_SUBST(LOCAL_LDFLAGS)AC_SUBST(LOCAL_LIBS)AC_OUTPUT(MakefileVERSIONadmin/Makefiledoc/mcl.spech/config.h)

⌨️ 快捷键说明

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