📄 aclocal.m4
字号:
if test $cf_dir = ncurses ; then case $cf_subset in *base*) ;; termlib*) cf_libname=$TINFO_LIB_SUFFIX if test -n "${DFT_ARG_SUFFIX}" ; then # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"` fi ;; esac fi # These dependencies really are for development, not # builds, but they are useful in porting, too. cf_depend="../include/ncurses_cfg.h" if test "$srcdir" = "."; then cf_reldir="." else cf_reldir="\$(srcdir)" fi if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h" elif test -f $srcdir/$cf_dir/curses.priv.h; then cf_depend="$cf_depend $cf_reldir/curses.priv.h" fi cf_dir_suffix= old_cf_suffix="$cf_suffix" if test "$cf_cv_shlib_version_infix" = yes ; then if test -n "$LIB_SUFFIX" ; then case $LIB_SUFFIX in w*) cf_libname=`echo $cf_libname | sed 's/w$//'` cf_suffix=`echo $cf_suffix | sed 's/^w//'` cf_dir_suffix=w ;; esac fi fi $AWK -f $srcdir/mk-1st.awk \ name=${cf_libname}${cf_dir_suffix} \ traces=$LIB_TRACING \ MODEL=$cf_ITEM \ model=$cf_subdir \ prefix=$cf_prefix \ suffix=$cf_suffix \ subset=$cf_subset \ ShlibVer=$cf_cv_shlib_version \ ShlibVerInfix=$cf_cv_shlib_version_infix \ DoLinks=$cf_cv_do_symlinks \ rmSoLocs=$cf_cv_rm_so_locs \ ldconfig="$LDCONFIG" \ overwrite=$WITH_OVERWRITE \ depend="$cf_depend" \ host="$host" \ $srcdir/$cf_dir/modules >>$cf_dir/Makefile cf_suffix="$old_cf_suffix" for cf_subdir2 in $cf_subdirs lib do test $cf_subdir = $cf_subdir2 && break done test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \ $AWK -f $srcdir/mk-2nd.awk \ name=$cf_dir \ traces=$LIB_TRACING \ MODEL=$cf_ITEM \ model=$cf_subdir \ subset=$cf_subset \ srcdir=$srcdir \ echo=$WITH_ECHO \ crenames=$cf_cv_prog_CC_c_o \ cxxrenames=$cf_cv_prog_CXX_c_o \ $srcdir/$cf_dir/modules >>$cf_dir/Makefile cf_subdirs="$cf_subdirs $cf_subdir" done done fi echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) [$]@' >>Makefiledonefor cf_dir in $SRC_SUBDIRSdo if test -f $cf_dir/Makefile ; then case "$cf_dir" in Ada95) #(vi echo 'libs \' >> Makefile echo 'install.libs \' >> Makefile echo 'uninstall.libs ::' >> Makefile echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) [$]@' >> Makefile ;; esac fi if test -f $srcdir/$cf_dir/modules; then echo >> Makefile if test -f $srcdir/$cf_dir/headers; thencat >> Makefile <<CF_EOFinstall.includes \\uninstall.includes \\CF_EOF fiif test "$cf_dir" != "c++" ; thenecho 'lint \' >> Makefileficat >> Makefile <<CF_EOFlibs \\lintlib \\install.libs \\uninstall.libs \\install.$cf_dir \\uninstall.$cf_dir :: cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \[$]@CF_EOF elif test -f $srcdir/$cf_dir/headers; thencat >> Makefile <<CF_EOFlibs \\install.libs \\uninstall.libs \\install.includes \\uninstall.includes :: cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \[$]@CF_EOFfidonecat >> Makefile <<CF_EOFinstall.data \\uninstall.data ::$MAKE_TERMINFO cd misc && \$(MAKE) \$(CF_MFLAGS) \[$]@install.man \\uninstall.man :: cd man && \$(MAKE) \$(CF_MFLAGS) \[$]@distclean :: rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h rm -f headers.sh headers.sed rm -rf \$(DIRS_TO_MAKE)CF_EOF# Special case: tack's manpage lives in its own directory.if test -d tack ; thenif test -f $srcdir/$tack.h; thencat >> Makefile <<CF_EOFinstall.man \\uninstall.man :: cd tack && \$(MAKE) \$(CF_MFLAGS) \[$]@CF_EOFfifidnl If we're installing into a subdirectory of /usr/include, etc., we shoulddnl prepend the subdirectory's name to the "#include" paths. It won't hurtdnl anything, and will make it more standardized. It's awkward to decide thisdnl at configuration because of quoting, so we'll simply make all headersdnl installed via a script that can do the right thing.rm -f headers.sed headers.shdnl ( generating this script makes the makefiles a little tidier :-)echo creating headers.shcat >headers.sh <<CF_EOF#! /bin/sh# This shell script is generated by the 'configure' script. It is invoked in a# subdirectory of the build tree. It generates a sed-script in the parent# directory that is used to adjust includes for header files that reside in a# subdirectory of /usr/include, etc.PRG=""while test \[$]# != 3doPRG="\$PRG \[$]1"; shiftdoneDST=\[$]1REF=\[$]2SRC=\[$]3TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$echo installing \$SRC in \$DSTCF_EOFif test $WITH_CURSES_H = yes; then cat >>headers.sh <<CF_EOFcase \$DST in/*/include/*) END=\`basename \$DST\` for i in \`cat \$REF/../*/headers |fgrep -v "#"\` do NAME=\`basename \$i\` echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED done ;;*) echo "" >> \$TMPSED ;;esacCF_EOFelse cat >>headers.sh <<CF_EOFcase \$DST in/*/include/*) END=\`basename \$DST\` for i in \`cat \$REF/../*/headers |fgrep -v "#"\` do NAME=\`basename \$i\` if test "\$NAME" = "curses.h" then echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED NAME=ncurses.h fi echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED done ;;*) echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED ;;esacCF_EOFficat >>headers.sh <<CF_EOFrm -f \$TMPSRCsed -f \$TMPSED \$SRC > \$TMPSRCNAME=\`basename \$SRC\`CF_EOFif test $WITH_CURSES_H != yes; then cat >>headers.sh <<CF_EOFtest "\$NAME" = "curses.h" && NAME=ncurses.hCF_EOFficat >>headers.sh <<CF_EOF# Just in case someone gzip'd manpages, remove the conflicting copy.test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gzeval \$PRG \$TMPSRC \$DST/\$NAMErm -f \$TMPSRC \$TMPSEDCF_EOFchmod 0755 headers.shfor cf_dir in $SRC_SUBDIRSdo if test -f $srcdir/$cf_dir/headers; then cat >>$cf_dir/Makefile <<CF_EOF\$(DESTDIR)\$(includedir) : sh \$(srcdir)/../mkinstalldirs \[$]@install \\install.libs \\install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\CF_EOF j="" for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"` do test -n "$j" && echo " $j \\" >>$cf_dir/Makefile j=$i done echo " $j" >>$cf_dir/Makefile for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"` do echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile test $i = curses.h && test $WITH_CURSES_H = yes && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile done cat >>$cf_dir/Makefile <<CF_EOFuninstall \\uninstall.libs \\uninstall.includes ::CF_EOF for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"` do i=`basename $i` echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile test $i = curses.h && echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile done fi if test -f $srcdir/$cf_dir/modules; then if test "$cf_dir" != "c++" ; then cat >>$cf_dir/Makefile <<"CF_EOF"depend : $(AUTO_SRC) makedepend -- $(CPPFLAGS) -- $(C_SRC)# DO NOT DELETE THIS LINE -- make depend depends on it.CF_EOF fi fidone])dnldnl ---------------------------------------------------------------------------dnl CF_LIB_SONAME version: 2 updated: 2005/06/25 16:05:47dnl -------------dnl Find the and soname for the given shared library. Set the cache variablednl cf_cv_$3_soname to this, unless it is not found. Then set the cachednl variable to "unknown".dnldnl $1 = headersdnl $2 = codednl $3 = library nameAC_DEFUN([CF_LIB_SONAME],[AC_CACHE_CHECK(for soname of $3 library,cf_cv_$3_soname,[cf_cv_$3_soname=unknownif test "$cross_compiling" != yes ; thencat >conftest.$ac_ext <<CF_EOF$1int main(){$2return 0;}CF_EOFcf_save_LIBS="$LIBS" LIBS="-l$3 $LIBS" if AC_TRY_EVAL(ac_compile) ; then if AC_TRY_EVAL(ac_link) ; then cf_cv_$3_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep lib$3.` test -z "$cf_cv_$3_soname" && cf_cv_$3_soname=unknown fi firm -f conftest*LIBS="$cf_save_LIBS"fi])])dnl ---------------------------------------------------------------------------dnl CF_LIB_SUFFIX version: 13 updated: 2003/11/01 16:09:07dnl -------------dnl Compute the library file-suffix from the given model namednl $1 = model namednl $2 = variable to setdnl The variable $LIB_SUFFIX, if set, prepends the variable to set.AC_DEFUN([CF_LIB_SUFFIX],[ AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) case $1 in libtool) $2='.la' ;; normal) $2='.a' ;; debug) $2='_g.a' ;; profile) $2='_p.a' ;; shared) case $cf_cv_system_name in cygwin*) $2='.dll' ;; darwin*) $2='.dylib' ;; hpux*) case $target in ia64*) $2='.so' ;; *) $2='.sl' ;; esac ;; *) $2='.so' ;; esac esac test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"])dnldnl ---------------------------------------------------------------------------dnl CF_LIB_TYPE version: 4 updated: 2000/10/20 22:57:49dnl -----------dnl Compute the string to append to -library from the given model namednl $1 = model namednl $2 = variable to setdnl The variable $LIB_SUFFIX, if set, prepends the variable to set.AC_DEFUN([CF_LIB_TYPE],[ case $1 in libtool) $2='' ;; normal) $2='' ;; debug) $2='_g' ;; profile) $2='_p' ;; shared) $2='' ;; esac test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"])dnldnl ---------------------------------------------------------------------------dnl CF_LINK_DATAONLY version: 6 updated: 2003/02/02 01:41:46dnl ----------------dnl Some systems have a non-ANSI linker that doesn't pull in modules that havednl only data (i.e., no functions), for example NeXT. On those systems we'lldnl have to provide wrappers for global tables to ensure they're linkeddnl properly.AC_DEFUN([CF_LINK_DATAONLY],[AC_MSG_CHECKING([if data-only library module links])AC_CACHE_VAL(cf_cv_link_dataonly,[ rm -f conftest.a cat >conftest.$ac_ext <<EOF#line __oline__ "configure"int testdata[[3]] = { 123, 456, 789 };EOF if AC_TRY_EVAL(ac_compile) ; then mv conftest.o data.o && \ ( $AR $AR_OPTS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null fi rm -f conftest.$ac_ext data.o cat >conftest.$ac_ext <<EOF#line __oline__ "configure"int testfunc(){#if defined(NeXT) exit(1); /* I'm told this linker is broken */#else extern int testdata[[3]]; return testdata[[0]] == 123 && testdata[[1]] == 456 && testdata[[2]] == 789;#endif}EOF if AC_TRY_EVAL(ac_compile); then mv conftest.o func.o && \ ( $AR $AR_OPTS conftest.a func.o ) 2>&AC_FD_CC 1>/dev/null fi rm -f conftest.$ac_ext func.o ( eval $RANLIB conftest.a ) 2>&AC_FD_CC >/dev/null cf_saveLIBS="$LIBS" LIBS="conftest.a $LIBS" AC_TRY_RUN([ int main() { extern int testfunc(); exit (!testfunc()); } ], [cf_cv_link_dataonly=yes], [cf_cv_link_dataonly=no], [cf_cv_link_dataonly=unknown]) LIBS="$cf_saveLIBS" ])AC_MSG_RESULT($cf_cv_link_dataonly)if test "$cf_cv_link_dataonly" = no ; then AC_DEFINE(BROKEN_LINKER) BROKEN_LINKER=1fi])dnldnl ---------------------------------------------------------------------------dnl CF_LINK_FUNCS version: 5 updated: 2003/02/02 01:41:46dnl -------------dnl Most Unix systems have both link and symlink, a few don't hav
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -