?? configure.in
字號:
dnl***************************************************************************dnl Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *dnl *dnl Permission is hereby granted, free of charge, to any person obtaining a *dnl copy of this software and associated documentation files (the *dnl "Software"), to deal in the Software without restriction, including *dnl without limitation the rights to use, copy, modify, merge, publish, *dnl distribute, distribute with modifications, sublicense, and/or sell *dnl copies of the Software, and to permit persons to whom the Software is *dnl furnished to do so, subject to the following conditions: *dnl *dnl The above copyright notice and this permission notice shall be included *dnl in all copies or substantial portions of the Software. *dnl *dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. *dnl *dnl Except as contained in this notice, the name(s) of the above copyright *dnl holders shall not be used in advertising or otherwise to promote the *dnl sale, use or other dealings in this Software without prior written *dnl authorization. *dnl***************************************************************************dnldnl Author: Thomas E. Dickey 1995-ondnldnl $Id: configure.in,v 1.312 2004/01/24 19:29:13 tom Exp $dnl Process this file with autoconf to produce a configure script.dnldnl See http://invisible-island.net/autoconf/ for additional information.dnldnl ---------------------------------------------------------------------------AC_PREREQ(2.13.20020210)AC_REVISION($Revision: 1.312 $)AC_INIT(ncurses/base/lib_initscr.c)AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)CF_SUBST_NCURSES_VERSIONCF_WITH_REL_VERSION(NCURSES)CF_WITH_ABI_VERSIONCF_CHECK_CACHE([AC_CANONICAL_SYSTEM])AC_ARG_WITH(system-type,[ --with-system-type=XXX test: override derived host system-type],[AC_MSG_WARN(overriding system type to $withval) cf_cv_system_name=$withval])### Save the given $CFLAGS to allow user-override.cf_user_CFLAGS="$CFLAGS"### Default install-locationCF_CFG_DEFAULTS### Checks for programs.AC_PROG_CCCF_GCC_VERSIONAC_PROG_CPPAC_PROG_GCC_TRADITIONALAC_ISC_POSIXCF_ANSI_CC_REQDCF_PROG_EXTCF_PROG_LDCONFIGdnl DEFECT in autoconf 2.12: an attempt to set policy, this breaks thednl configure script by not letting us test if C++dnl is present, making this option necessary.AC_MSG_CHECKING(if you want to ensure bool is consistent with C++)AC_ARG_WITH(cxx, [ --without-cxx do not adjust ncurses bool to match C++], [cf_with_cxx=$withval], [cf_with_cxx=yes])AC_MSG_RESULT($cf_with_cxx)if test "X$cf_with_cxx" = Xno ; then CXX="" GXX=""else # with autoconf 2.13, we can change the error to a warning: pushdef([AC_MSG_ERROR], [AC_MSG_RESULT(no) AC_MSG_WARN([You don't have any C++ compiler, too bad]) cf_with_cxx=no; CXX=""; GXX="";])dnl AC_PROG_CXX popdef([AC_MSG_ERROR])dnl # autoconf 2.5x removed the error - by hardcoding it to g++. if test "$CXX" = "g++" ; then AC_PATH_PROG(CXX,g++) fi if test "$CXX" = "g++" ; then AC_MSG_WARN(ignoring hardcoded g++) cf_with_cxx=no; CXX=""; GXX=""; fifiCF_GXX_VERSIONcase $GXX_VERSION in1*|2.[[0-6]]*) GXX=""; CXX=""; ac_cv_prog_gxx=no cf_cxx_library=no AC_MSG_WARN(templates do not work) ;;esacAC_MSG_CHECKING(if you want to build C++ binding and demo)AC_ARG_WITH(cxx-binding, [ --without-cxx-binding do not build C++ binding and demo], [cf_with_cxx_binding=$withval], [cf_with_cxx_binding=$cf_with_cxx])AC_MSG_RESULT($cf_with_cxx_binding)AC_MSG_CHECKING(if you want to build with Ada95)AC_ARG_WITH(ada, [ --without-ada suppress check for Ada95, don't build demo], [cf_with_ada=$withval], [cf_with_ada=yes])AC_MSG_RESULT($cf_with_ada)AC_MSG_CHECKING(if you want to build programs such as tic)AC_ARG_WITH(progs, [ --without-progs suppress build with programs (e.g., tic)], [cf_with_progs=$withval], [cf_with_progs=yes])AC_MSG_RESULT($cf_with_progs)AC_MSG_CHECKING(if you wish to install curses.h)AC_ARG_WITH(curses-h, [ --without-curses-h install curses.h as ncurses.h only], [with_curses_h=$withval], [with_curses_h=yes])AC_MSG_RESULT($with_curses_h)modules_to_build="ncurses"if test "X$cf_with_progs" != Xno ; thenmodules_to_build="$modules_to_build progs tack"fimodules_to_build="$modules_to_build panel menu form"AC_ARG_PROGRAMAC_PROG_AWKAC_PROG_MAKE_SETCF_PROG_INSTALLAC_SYS_LONG_FILE_NAMESCF_MIXEDCASE_FILENAMESAC_PROG_LN_SCF_MAKE_TAGSAC_CHECK_PROGS(LINT, tdlint lint alint)AC_CHECK_PROGS(MAN, man man_db)AC_SUBST(LINT_OPTS)dnl These are standard among *NIX systems, but not when cross-compilingAC_CHECK_TOOL(RANLIB, ranlib, ':')AC_CHECK_TOOL(LD, ld, ld)AC_CHECK_TOOL(AR, ar, ar)CF_SUBST(archiver options,AR_OPTS,rv)CF_MAKEFLAGSdnl Special option for use by system-builders: the install-prefix is used todnl adjust the location into which the actual install is done, so that andnl archive can be built without modifying the host system's configuration.AC_MSG_CHECKING(if you have specified an install-prefix)AC_ARG_WITH(install-prefix, [ --with-install-prefix prefixes actual install-location ($DESTDIR)], [case "$withval" in #(vi yes|no) #(vi ;; *) DESTDIR="$withval" ;; esac])AC_MSG_RESULT($DESTDIR)AC_SUBST(DESTDIR)###############################################################################CF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-compiling:)# If we're cross-compiling, allow the user to override the tools and their# options. The configure script is oriented toward identifying the host# compiler, etc., but we need a build compiler to generate parts of the source.: ${BUILD_CC:='$(CC)'}: ${BUILD_CFLAGS:='$(CFLAGS)'}: ${BUILD_CPPFLAGS:='$(CPPFLAGS)'}: ${BUILD_LDFLAGS:='$(LDFLAGS)'}: ${BUILD_LIBS:='$(LIBS)'}: ${BUILD_EXEEXT:='$x'}if test "$cross_compiling" = yes ; then AC_ARG_WITH(build-cc, [ --with-build-cc=XXX the build C compiler ($BUILD_CC)], [BUILD_CC="$withval"], [AC_CHECK_PROGS(BUILD_CC, $CC gcc cc)]) AC_ARG_WITH(build-cflags, [ --with-build-cflags=XXX the build C compiler-flags], [BUILD_CFLAGS="$withval"]) AC_ARG_WITH(build-cppflags, [ --with-build-cppflags=XXX the build C preprocessor-flags], [BUILD_CPPFLAGS="$withval"]) AC_ARG_WITH(build-ldflags, [ --with-build-ldflags=XXX the build linker-flags], [BUILD_LDFLAGS="$withval"]) AC_ARG_WITH(build-libs, [ --with-build-libs=XXX the build libraries], [BUILD_LIBS="$withval"]) BUILD_EXEEXT=fiAC_SUBST(BUILD_CC)AC_SUBST(BUILD_CFLAGS)AC_SUBST(BUILD_CPPFLAGS)AC_SUBST(BUILD_LDFLAGS)AC_SUBST(BUILD_LIBS)AC_SUBST(BUILD_EXEEXT)###############################################################################CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)### Options to allow the user to specify the set of libraries which are used.### Use "--without-normal --with-shared" to allow the default model to be### shared, for example.cf_list_models=""AC_SUBST(cf_list_models)dnl the complete list of models ("normal debug")CF_WITH_LIBTOOLif test "$with_libtool" != "no" ; thencf_list_models="$cf_list_models libtool"elseAC_MSG_CHECKING(if you want to build shared libraries)AC_ARG_WITH(shared, [ --with-shared generate shared-libraries], [with_shared=$withval], [with_shared=no])AC_MSG_RESULT($with_shared)test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"AC_MSG_CHECKING(if you want to build static libraries)AC_ARG_WITH(normal, [ --with-normal generate normal-libraries (default)], [with_normal=$withval], [with_normal=yes])AC_MSG_RESULT($with_normal)test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"AC_MSG_CHECKING(if you want to build debug libraries)AC_ARG_WITH(debug, [ --with-debug generate debug-libraries (default)], [with_debug=$withval], [with_debug=yes])AC_MSG_RESULT($with_debug)test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"AC_MSG_CHECKING(if you want to build profiling libraries)AC_ARG_WITH(profile, [ --with-profile generate profile-libraries], [with_profile=$withval], [with_profile=no])AC_MSG_RESULT($with_profile)test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"fi###############################################################################AC_MSG_CHECKING(for specified models)test -z "$cf_list_models" && cf_list_models=normaldnl If we use libtool to generate libraries, then it must be the onlydnl specified model.test "$with_libtool" != "no" && cf_list_models=libtoolAC_MSG_RESULT($cf_list_models)### Use the first model as the default, and save its suffix for use in building### up test-applications.AC_MSG_CHECKING(for default model)DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`AC_MSG_RESULT($DFT_LWR_MODEL)CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnlAC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal")AC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL")TINFO_NAME=tinfoAC_SUBST(TINFO_NAME)LIB_NAME=ncursesAC_SUBST(LIB_NAME)LIB_DIR=../libCF_LIB_PREFIX(cf_prefix)LIB_PREFIX=$cf_prefixAC_SUBST(LIB_PREFIX)LIB_SUFFIX=AC_SUBST(LIB_SUFFIX)###############################################################################AC_MSG_CHECKING(if you want to build a separate terminfo library)AC_ARG_WITH(termlib, [ --with-termlib generate separate terminfo library], [with_termlib=$withval], [with_termlib=no])AC_MSG_RESULT($with_termlib)### Checks for special libraries, must be done up-front.CF_WITH_DBMALLOCCF_WITH_DMALLOCSHLIB_LIST=""AC_MSG_CHECKING(if you want to link with the gpm mouse library)AC_ARG_WITH(gpm, [ --with-gpm use Alessandro Rubini's GPM library], [with_gpm=$withval], [with_gpm=no])AC_MSG_RESULT($with_gpm)if test "$with_gpm" = yes ; then AC_CHECK_LIB(gpm,Gpm_Open,[ EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS" SHLIB_LIST="-lgpm $SHLIB_LIST" AC_DEFINE(HAVE_LIBGPM) AC_CHECK_HEADERS(gpm.h) ],AC_MSG_WARN(Cannot link with gpm library - read the FAQ))fiCF_WITH_SYSMOUSEdnl Not all ports of gcc support the -g optionif test X"$CC_G_OPT" = X"" ; then CC_G_OPT='-g' test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''fiAC_SUBST(CC_G_OPT)if test X"$CXX_G_OPT" = X"" ; then CXX_G_OPT='-g' test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''fiAC_SUBST(CXX_G_OPT)AC_MSG_CHECKING(for default loader flags)case $DFT_LWR_MODEL inlibtool) LD_MODEL='' ;;normal) LD_MODEL='' ;;debug) LD_MODEL=$CC_G_OPT ;;profile) LD_MODEL='-pg';;shared) LD_MODEL='' ;;esacAC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg)AC_MSG_RESULT($LD_MODEL)AC_MSG_CHECKING(if rpath option should be used)AC_ARG_ENABLE(rpath,[ --enable-rpath use rpath option when generating shared libraries],[cf_cv_ld_rpath=$enableval],[cf_cv_ld_rpath=no])AC_MSG_RESULT($cf_cv_ld_rpath)CF_SHARED_OPTSif test "$CC_SHARED_OPTS" = "unknown"; then for model in $cf_list_models; do if test "$model" = "shared"; then AC_ERROR(Shared libraries are not supported in this version) fi donefi###############################################################################CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)### use option --disable-overwrite to leave out the link to -lcursesAC_MSG_CHECKING(if you wish to install ncurses overwriting curses)AC_ARG_ENABLE(overwrite, [ --disable-overwrite leave out the link to -lcurses], [with_overwrite=$enableval], [if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi])AC_MSG_RESULT($with_overwrite)AC_MSG_CHECKING(if external terminfo-database is used)AC_ARG_ENABLE(database, [ --disable-database do not use terminfo, only fallbacks/termcap], [use_database=$enableval], [use_database=yes])AC_MSG_RESULT($use_database)case $host_os in #(vios2*) #(vi TERMINFO_SRC='${top_srcdir}/misc/emx.src' ;;*) #(vi TERMINFO_SRC='${top_srcdir}/misc/terminfo.src' ;;esacAC_SUBST(TERMINFO_SRC)CF_PATHSEPif test "$use_database" != no ; then AC_DEFINE(USE_DATABASE) AC_MSG_CHECKING(which terminfo source-file will be installed) AC_ARG_ENABLE(database, [ --with-database=XXX specify terminfo source to install], [TERMINFO_SRC=$withval]) AC_MSG_RESULT($TERMINFO_SRC)fiAC_MSG_CHECKING(for list of fallback descriptions)AC_ARG_WITH(fallbacks, [ --with-fallbacks=XXX specify list of fallback terminal descriptions], [with_fallback=$withval], [with_fallback=])AC_MSG_RESULT($with_fallback)FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`AC_SUBST(FALLBACK_LIST)MAKE_TERMINFO=if test "$use_database" = no ; then TERMINFO="${datadir}/terminfo" MAKE_TERMINFO="#"elseAC_MSG_CHECKING(for list of terminfo directories)CF_WITH_PATHLIST(terminfo-dirs, [ --with-terminfo-dirs=XXX specify list of terminfo directories], TERMINFO_DIRS, DATADIR/terminfo, ${datadir}/terminfo)AC_MSG_RESULT($TERMINFO_DIRS)test -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS")AC_MSG_CHECKING(for default terminfo directory)CF_WITH_PATH(default-terminfo-dir, [ --with-default-terminfo-dir=DIR default terminfo directory], TERMINFO, DATADIR/terminfo, ${datadir}/terminfo)AC_MSG_RESULT($TERMINFO)AC_DEFINE_UNQUOTED(TERMINFO,"$TERMINFO")fiAC_SUBST(TERMINFO)AC_SUBST(MAKE_TERMINFO)### use option --disable-big-core to make tic run on small machines### We need 4Mb, check if we can allocate 50% more than that.AC_MSG_CHECKING(if big-core option selected)AC_ARG_ENABLE(big-core, [ --disable-big-core assume machine has little memory],
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -