?? configure.in
字號:
AC_MSG_CHECKING(whether to add trace feature to all models)AC_ARG_WITH(trace,[ --with-trace test: add trace() function to all models of ncurses],[cf_with_trace=$withval],[cf_with_trace=$cf_all_traces])AC_MSG_RESULT($with_trace)if test "$cf_with_trace" = yes ; then LIB_TRACING=all ADA_TRACE=TRUE CF_ADD_CFLAGS(-DTRACE)else LIB_TRACING=DEBUG ADA_TRACE=FALSEfiAC_SUBST(ADA_TRACE)### Checks for libraries.AC_CHECK_FUNC(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY),[AC_CHECK_LIB(bsd, gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY) LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofdayCF_MATH_LIB(MATH_LIB,sin(x))AC_SUBST(MATH_LIB)### Checks for header files.AC_STDC_HEADERSAC_HEADER_DIRENTAC_HEADER_TIMECF_REGEXdnl These are some other potentially nonportable headers.AC_CHECK_HEADERS( \fcntl.h \getopt.h \libc.h \limits.h \locale.h \poll.h \sys/bsdtypes.h \sys/ioctl.h \sys/param.h \sys/poll.h \sys/select.h \sys/time.h \sys/times.h \ttyent.h \unistd.h \wctype.h )# check for ISC (this may also define _POSIX_SOURCE)# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_setif test "$ISC" = yes ; then AC_CHECK_LIB(cposix,main) AC_CHECK_LIB(inet,bzero,LIBS="$LIBS -linet")dnl also 'select()'fiCF_SYS_TIME_SELECT### checks for compiler characteristicsAC_LANG_CAC_C_CONSTAC_C_INLINEtest "$ac_cv_c_inline" != no && AC_DEFINE(CC_HAS_INLINE_FUNCS)CF_TYPEOF_CHTYPE### Checks for external-dataCF_ERRNOCF_LINK_DATAONLY### Checks for library functions.AC_CHECK_FUNCS( \getcwd \getegid \geteuid \getttynam \issetugid \memccpy \nanosleep \poll \remove \select \setbuf \setbuffer \setvbuf \sigaction \sigvec \strdup \strstr \tcgetpgrp \times \vsnprintf \)if test "$with_getcap" = "yes" ; then CF_CGETENTfiCF_ISASCIICF_STRUCT_SIGACTIONCF_FUNC_TERMIOSCF_FUNC_VSSCANFCF_MKSTEMP# setup for prototype of fallback for vsscanf()if test "$cf_cv_func_vsscanf" = vsscanf ; then HAVE_VSSCANF=1else HAVE_VSSCANF=0fiAC_SUBST(HAVE_VSSCANF)dnl FIXME (may need this) AC_SYS_RESTARTABLE_SYSCALLSif test "$cross_compiling" = yes ; then AC_MSG_WARN(cross compiling: assume setvbuf params not reversed)else AC_FUNC_SETVBUF_REVERSEDfiAC_TYPE_SIGNALCF_TYPE_SIGACTIONCF_SIZECHANGECF_FUNC_MEMMOVECF_FUNC_POLLdnl We'll do our own -g libraries, unless the user's overridden via $CFLAGSif test -z "$cf_user_CFLAGS" ; then CF_STRIP_G_OPT(CFLAGS) CF_STRIP_G_OPT(CXXFLAGS)fi# Just in case, check if the C compiler has a bool type.CF_BOOL_DECL(cf_cv_cc_bool_type)# Check for C++ compiler characteristics (and ensure that it's there!)if test -n "$CXX" ; then AC_LANG_CPLUSPLUS CF_STDCPP_LIBRARY case $GXX_VERSION in 1*|2.[0-6]*) cf_cxx_library=yes ;; *-2.7*|2.7*) CF_GPP_LIBRARY ;; *) cf_cxx_library=no ;; esac AC_CHECK_HEADERS(typeinfo) CF_BOOL_DECL CF_BOOL_SIZE CF_ETIP_DEFINES CF_CPP_PARAM_INIT CF_CPP_VSCAN_FUNC CXX_AR='$(AR)' CXX_AR_OPTS='$(AR_OPTS)' case $cf_cv_system_name in #(vi irix*) #(vi if test "$GXX" != yes ; then CXX_AR='$(CXX)' CXX_AR_OPTS='-ar -o' fi ;; sco3.2v5*) #(vi CXXLDFLAGS="-u main" ;; solaris2*) if test "$GXX" != yes ; then CXX_AR='$(CXX)' CXX_AR_OPTS='-xar -o' fi ;; esac AC_SUBST(CXXLDFLAGS) AC_SUBST(CXX_AR) AC_SUBST(CXX_AR_OPTS)else cf_cxx_library=no cf_cv_builtin_bool=1 # Just because we are not configuring against C++ right now does not # mean that a user will not want to use C++. Some distributors disable # the C++ portion of this configuration as a shortcut (or just to avoid # compiling the demo in the c++ directory). So we need a reasonable # default for the 'bool' type. # # Caveat: since the storage of the bool type is not standardized, it # may change. if test "$NCURSES_BOOL" != auto ; then cf_cv_type_of_bool=$NCURSES_AUTO else if test "$cf_cv_header_stdbool_h" = 1 ; then else AC_MSG_CHECKING(for fallback type of bool) case "$host_cpu" in #(vi i?86) cf_cv_type_of_bool=char ;; #(vi *) cf_cv_type_of_bool=int ;; esac AC_MSG_RESULT($cf_cv_type_of_bool) fi fifiAC_SUBST(CXXLIBS)# If the C compiler did not declare bool, and we did not determine that the C++# compiler does not declare bool, turn on an ifdef in curses.h that makes the# ncurses library use the same type as C++ bool. Note that this allows one to# specify the type of bool in a configure-script option and postpone# integration with the C++ compiler provided that the types are compatible.USE_CXX_BOOL=1if test $cf_cv_cc_bool_type = 1then # oops: C has a bool. Unlikely, but C++ could differ. USE_CXX_BOOL=0elif test $cf_cv_builtin_bool = 0then # C++ has no bool USE_CXX_BOOL=0else # this is the normal case USE_CXX_BOOL='defined(__cplusplus)'fiAC_SUBST(USE_CXX_BOOL)CF_HELP_MESSAGE(Ada95 Binding Options:)dnl Check for availability of GNU Ada Translator (GNAT).dnl At the moment we support no other Ada95 compiler.if test "$cf_with_ada" != "no" ; thencf_ada_make=gnatmakeAC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)if test "$ac_cv_prog_gnat_exists" = no; then cf_ada_make=else CF_GNAT_VERSION AC_CHECK_PROG(M4_exists, m4, yes, no) if test "$ac_cv_prog_M4_exists" = no; then cf_cv_prog_gnat_correct=no echo Ada95 binding required program m4 not found. Ada95 binding disabled. fi if test "$cf_cv_prog_gnat_correct" = yes; then AC_MSG_CHECKING(if GNAT works) CF_GNAT_TRY_RUN([procedure conftest;],[with Text_IO;with GNAT.OS_Lib;procedure conftest isbegin Text_IO.Put ("Hello World"); Text_IO.New_Line; GNAT.OS_Lib.OS_Exit (0);end conftest;],[cf_cv_prog_gnat_correct=yes],[cf_cv_prog_gnat_correct=no]) AC_MSG_RESULT($cf_cv_prog_gnat_correct) fifiif test "$cf_cv_prog_gnat_correct" = yes; then ADAFLAGS="-O3 -gnatpn $ADAFLAGS" AC_ARG_WITH(ada-compiler, [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)], [cf_ada_compiler=$withval], [cf_ada_compiler=gnatmake]) cf_ada_package=terminal_interface AC_SUBST(cf_ada_make) AC_SUBST(cf_ada_compiler) AC_SUBST(cf_ada_package) AC_SUBST(ADAFLAGS) AC_SUBST(cf_compile_generics) AC_SUBST(cf_generic_objects) CF_WITH_PATH(ada-include, [ --with-ada-include=DIR Ada includes are in DIR], ADA_INCLUDE, PREFIX/lib/ada/adainclude, [$]prefix/lib/ada/adainclude) AC_SUBST(ADA_INCLUDE) CF_WITH_PATH(ada-objects, [ --with-ada-objects=DIR Ada objects are in DIR], ADA_OBJECTS, PREFIX/lib/ada/adalib, [$]prefix/lib/ada/adalib) AC_SUBST(ADA_OBJECTS)fifi### Construct the library-subsets, if any, from this set of keywords:### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).AC_MSG_CHECKING(for library subsets)if test "$with_termlib" = yes ; then LIB_SUBSETS="termlib" test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo" LIB_SUBSETS="${LIB_SUBSETS} "else LIB_SUBSETS="termlib+" test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"fiLIB_SUBSETS="${LIB_SUBSETS}base"test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"AC_MSG_RESULT($LIB_SUBSETS)### Construct the list of include-directories to be generatedCF_INCLUDE_DIRSCF_ADA_INCLUDE_DIRS### Build up pieces for makefile rulesAC_MSG_CHECKING(default library suffix)CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnlAC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")AC_MSG_RESULT($DFT_ARG_SUFFIX)AC_MSG_CHECKING(default library-dependency suffix)CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnlif test $DFT_LWR_MODEL = shared ; then case $cf_cv_system_name in #(vi cygwin*) DFT_DEP_SUFFIX=".dll.a" ;; esacfiAC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")AC_MSG_RESULT($DFT_DEP_SUFFIX)AC_MSG_CHECKING(default object directory)CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnlAC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")AC_MSG_RESULT($DFT_OBJ_SUBDIR)# libtool thinks it can make c++ shared libraries (perhaps only g++)if test "$cf_with_cxx" = yes ; thenAC_MSG_CHECKING(c++ library-dependency suffix)if test "$with_libtool" != "no"; then CXX_LIB_SUFFIX=$DFT_DEP_SUFFIXelse CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX)dnl we normally make a static libraryfiAC_MSG_RESULT($CXX_LIB_SUFFIX)AC_SUBST(CXX_LIB_SUFFIX)fiTINFO_LIST="$SHLIB_LIST"if test "$with_libtool" = no ; then test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"fiAC_MSG_CHECKING(where we will install curses.h)test "$with_overwrite" = no && \test "x$includedir" = 'x${prefix}/include' && \ includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}AC_MSG_RESULT($includedir)### Resolve a conflict between normal and wide-curses by forcing applications### that will need libutf8 to add it to their configure script.if test "$with_overwrite" != no ; thenif test "$NCURSES_LIBUTF8" = 1 ; then NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)' AC_MSG_WARN(Wide-character applications must define HAVE_LIBUTF8_H to include curses.h)fifiAC_SUBST(EXTRA_LIBS)AC_SUBST(TINFO_LIST)AC_SUBST(SHLIB_LIST)### Set up low-level terminfo dependencies for makefiles. Note that we### could override this.if test "$with_termlib" = yes ; then TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}" if test "$DFT_LWR_MODEL" = "libtool"; then TEST_ARGS="${TEST_DEPS}" else TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}" fifiPROG_DEPS="$TEST_DEPS"PROG_ARGS="$TEST_ARGS"### predefined stuff for the test programsAC_DEFINE(HAVE_SLK_COLOR)### Construct the list of subdirectories for which we'll customize makefiles### with the appropriate compile-rules.CF_SRC_MODULES($modules_to_build)CF_DIRS_TO_MAKEAC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP')AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}")### Now that we're done running tests, add the compiler-warnings, if anyCF_ADD_CFLAGS($EXTRA_CFLAGS)################################################################################test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"AC_OUTPUT( \ include/MKterm.h.awk \ include/curses.head:include/curses.h.in \ include/termcap.h \ include/unctrl.h \ $SUB_MAKEFILES \ Makefile,[CF_LIB_RULES],[### configuration-run into config.statusAWK="$AWK"CF_LIST_MODELS="$cf_list_models"DFT_LWR_MODEL="$DFT_LWR_MODEL"LDCONFIG="$LDCONFIG"LIB_NAME="$LIB_NAME"LIB_SUBSETS="$LIB_SUBSETS"LIB_SUFFIX="$LIB_SUFFIX"LIB_TRACING="$LIB_TRACING"MAKE_TERMINFO="$MAKE_TERMINFO"NCURSES_OSPEED="$NCURSES_OSPEED"SRC_SUBDIRS="$SRC_SUBDIRS"TERMINFO="$TERMINFO"TINFO_NAME="$TINFO_NAME"WITH_CURSES_H="$with_curses_h"WITH_ECHO="$with_echo"WITH_OVERWRITE="$with_overwrite"cf_cv_abi_version="$cf_cv_abi_version"cf_cv_do_symlinks="$cf_cv_do_symlinks"cf_cv_rel_version="$cf_cv_rel_version"cf_cv_rm_so_locs="$cf_cv_rm_so_locs"cf_cv_shlib_version="$cf_cv_shlib_version"cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"cf_cv_system_name="$cf_cv_system_name"cf_with_cxx_binding="$cf_with_cxx_binding"host="$host"target="$target"],cat)dnl${MAKE-make} preinstall
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -