acinclude.m4

来自「基于4个mips核的noc设计」· M4 代码 · 共 1,996 行 · 第 1/5 页

M4
1,996
字号
    ENDIAN="CYG_LSBFIRST";else    ENDIAN="CYG_MSBFIRST";fiAC_MSG_RESULT(${ac_cv_c_little_endian})AC_SUBST(ENDIAN)])dnl ====================================================================dnl Look for the path to libgcc, so we can use it to directly linkdnl in libgcc.a with LD.AC_DEFUN(CYG_AC_PATH_LIBGCC,[AC_MSG_CHECKING([Looking for the path to libgcc.a])AC_LANG_SAVEAC_LANG_Cdnl Get Gcc's full path to libgcc.alibgccpath=`${CC} --print-libgcc`dnl If we don't have a path with libgcc.a on the end, this isn't G++.if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then   ac_cv_prog_gcc=yeselse   ac_cv_prog_gcc=nofidnl if test x"${ac_cv_prog_gcc}" = xyes ; then   gccpath=`echo $libgccpath | sed -e 's:/libgcc.a::'`   LIBGCC="-L${gccpath}"   AC_MSG_RESULT(${gccpath})else   LIBGCC=""   AC_MSG_ERROR(Not using gcc)fiAC_LANG_RESTOREAC_SUBST(LIBGCC)])dnl ====================================================================dnl Ok, lets find the tcl source trees so we can use the headersdnl Warning: transition of version 9 to 10 will break this algorithmdnl because 10 sorts before 9. We also look for just tcl. We have todnl be careful that we don't match stuff like tclX by accident.dnl the alternative search directory is involked by --with-tclincludeAC_DEFUN(CYG_AC_PATH_TCL, [    CYG_AC_PATH_TCLH    CYG_AC_PATH_TCLCONFIG    CYG_AC_LOAD_TCLCONFIG])AC_DEFUN(CYG_AC_PATH_TCLH, [dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."no_tcl=trueAC_MSG_CHECKING(for Tcl headers in the source tree)AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory where tcl headers are], with_tclinclude=${withval})AC_CACHE_VAL(ac_cv_c_tclh,[dnl first check to see if --with-tclinclude was specifiedif test x"${with_tclinclude}" != x ; then  if test -f ${with_tclinclude}/tcl.h ; then    ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`  elif test -f ${with_tclinclude}/generic/tcl.h ; then    ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`  else    AC_MSG_ERROR([${with_tclinclude} directory doesn't contain headers])  fifidnl next check if it came with Tcl configuration fileif test x"${ac_cv_c_tclconfig}" != x ; then  for i in $dirlist; do    if test -f $ac_cv_c_tclconfig/$i/generic/tcl.h ; then      ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/$i/generic; pwd)`      break    fi  donefidnl next check in private source directorydnl since ls returns lowest version numbers first, reverse its outputif test x"${ac_cv_c_tclh}" = x ; then    dnl find the top level Tcl source directory    for i in $dirlist; do        if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then	    tclpath=$srcdir/$i	    break	fi    done    dnl find the exact Tcl source dir. We do it this way, cause there    dnl might be multiple version of Tcl, and we want the most recent one.    for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do        if test -f $i/generic/tcl.h ; then          ac_cv_c_tclh=`(cd $i/generic; pwd)`          break        fi    donefidnl check if its installed with the compilerif test x"${ac_cv_c_tclh}" = x ; then    dnl Get the path to the compiler    ccpath=`which ${CC}  | sed -e 's:/bin/.*::'`/include    if test -f $ccpath/tcl.h; then        ac_cv_c_tclh=$ccpath    fifidnl see if one is installedif test x"${ac_cv_c_tclh}" = x ; then   AC_MSG_RESULT(none)   AC_CHECK_HEADER(tcl.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")else   AC_MSG_RESULT(${ac_cv_c_tclh})fi])  TCLHDIR=""if test x"${ac_cv_c_tclh}" = x ; then    AC_MSG_ERROR([Can't find any Tcl headers])fiif test x"${ac_cv_c_tclh}" != x ; then    no_tcl=""    if test x"${ac_cv_c_tclh}" != x"installed" ; then	if test x"${CC}" = xcl ; then	    tmp="`cygpath --windows ${ac_cv_c_tclh}`"	    ac_cv_c_tclh="`echo $tmp | sed -e s#\\\\\\\\#/#g`"	fi        AC_MSG_RESULT(${ac_cv_c_tclh})        TCLHDIR="-I${ac_cv_c_tclh}"    fifiAC_SUBST(TCLHDIR)])dnl ====================================================================dnl Ok, lets find the tcl configurationAC_DEFUN(CYG_AC_PATH_TCLCONFIG, [dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."dnl First, look for one uninstalled.  dnl the alternative search directory is invoked by --with-tclconfigif test x"${no_tcl}" = x ; then  dnl we reset no_tcl in case something fails here    no_tcl=true    AC_ARG_WITH(tclconfig, [  --with-tclconfig           directory containing tcl configuration (tclConfig.sh)],         with_tclconfig=${withval})    AC_MSG_CHECKING([for Tcl configuration script])    AC_CACHE_VAL(ac_cv_c_tclconfig,[    dnl First check to see if --with-tclconfig was specified.    if test x"${with_tclconfig}" != x ; then        if test -f "${with_tclconfig}/tclConfig.sh" ; then            ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`        else            AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])        fi    fi    dnl next check if it came with Tcl configuration file in the source tree    if test x"${ac_cv_c_tclconfig}" = x ; then        for i in $dirlist; do            if test -f $srcdir/$i/unix/tclConfig.sh ; then                ac_cv_c_tclconfig=`(cd $srcdir/$i/unix; pwd)`	        break            fi        done    fi    dnl check in a few other locations    if test x"${ac_cv_c_tclconfig}" = x ; then        dnl find the top level Tcl source directory        for i in $dirlist; do            if test -n "`ls -dr $i/tcl* 2>/dev/null`" ; then	        tclconfpath=$i	        break	    fi        done        dnl find the exact Tcl dir. We do it this way, cause there        dnl might be multiple version of Tcl, and we want the most recent one.        for i in `ls -dr $tclconfpath/tcl* 2>/dev/null ` ; do            if test -f $i/unix/tclConfig.sh ; then                ac_cv_c_tclconfig=`(cd $i/unix; pwd)`                break            fi        done    fi    dnl Check to see if it's installed. We have to look in the $CC path    dnl to find it, cause our $prefix may not match the compilers.    if test x"${ac_cv_c_tclconfig}" = x ; then        dnl Get the path to the compiler	ccpath=`which ${CC}  | sed -e 's:/bin/.*::'`/lib        if test -f $ccpath/tclConfig.sh; then	    ac_cv_c_tclconfig=$ccpath        fi    fi    ])	dnl end of cache_val    if test x"${ac_cv_c_tclconfig}" = x ; then        TCLCONFIG=""        AC_MSG_WARN(Can't find Tcl configuration definitions)    else        no_tcl=""        TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh        AC_MSG_RESULT(${TCLCONFIG})     fifiAC_SUBST(TCLCONFIG)])dnl Defined as a separate macro so we don't have to cache the valuesdnl from PATH_TCLCONFIG (because this can also be cached).AC_DEFUN(CYG_AC_LOAD_TCLCONFIG, [    . $TCLCONFIGdnl AC_SUBST(TCL_VERSION)dnl AC_SUBST(TCL_MAJOR_VERSION)dnl AC_SUBST(TCL_MINOR_VERSION)dnl AC_SUBST(TCL_CC)    AC_SUBST(TCL_DEFS)dnl not used, don't export to save symbols    AC_SUBST(TCL_LIB_FILE)    AC_SUBST(TCL_LIB_FULL_PATH)    AC_SUBST(TCL_LIBS)dnl not used, don't export to save symbolsdnl    AC_SUBST(TCL_PREFIX)    AC_SUBST(TCL_CFLAGS)dnl not used, don't export to save symbolsdnl    AC_SUBST(TCL_EXEC_PREFIX)    AC_SUBST(TCL_SHLIB_CFLAGS)    AC_SUBST(TCL_SHLIB_LD)dnl don't export, not used outside of configurednl AC_SUBST(TCL_SHLIB_LD_LIBS)dnl AC_SUBST(TCL_SHLIB_SUFFIX)dnl not used, don't export to save symbolsdnl AC_SUBST(TCL_DL_LIBS)    AC_SUBST(TCL_LD_FLAGS)    AC_SUBST(TCL_LD_SEARCH_FLAGS)dnl don't export, not used outside of configurednl AC_SUBST(TCL_COMPAT_OBJS)    AC_SUBST(TCL_RANLIB)    AC_SUBST(TCL_BUILD_LIB_SPEC)    AC_SUBST(TCL_LIB_SPEC)    AC_SUBST(TCL_BIN_DIR)dnl AC_SUBST(TCL_LIB_VERSIONS_OK)dnl not used, don't export to save symbolsdnl    AC_SUBST(TCL_SHARED_LIB_SUFFIX)dnl not used, don't export to save symbolsdnl    AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)])dnl ====================================================================AC_DEFUN(CYG_AC_PATH_TK, [    CYG_AC_PATH_TKH    CYG_AC_PATH_TKCONFIG    CYG_AC_LOAD_TKCONFIG])AC_DEFUN(CYG_AC_PATH_TKH, [## Ok, lets find the tk source trees so we can use the headers# If the directory (presumably symlink) named "tk" exists, use that one# in preference to any others.  Same logic is used when choosing library# and again with Tcl. The search order is the best place to look first, then in# decreasing significance. The loop breaks if the trigger file is found.# Note the gross little conversion here of srcdir by cd'ing to the found# directory. This converts the path from a relative to an absolute, so# recursive cache variables for the path will work right. We check all# the possible paths in one loop rather than many seperate loops to speed# things up.# the alternative search directory is involked by --with-tkinclude#dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."no_tk=trueAC_MSG_CHECKING(for Tk headers in the source tree)AC_ARG_WITH(tkinclude, [  --with-tkinclude       directory where tk headers are], with_tkinclude=${withval})AC_CACHE_VAL(ac_cv_c_tkh,[dnl first check to see if --with-tkinclude was specifiedif test x"${with_tkinclude}" != x ; then  if test -f ${with_tkinclude}/tk.h ; then    ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`  elif test -f ${with_tkinclude}/generic/tk.h ; then    ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`  else    AC_MSG_ERROR([${with_tkinclude} directory doesn't contain headers])  fifidnl next check if it came with Tk configuration fileif test x"${ac_cv_c_tkconfig}" != x ; then  for i in $dirlist; do    if test -f $ac_cv_c_tkconfig/$i/generic/tk.h ; then      ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/$i/generic; pwd)`      break    fi  donefidnl next check in private source directorydnl since ls returns lowest version numbers first, reverse its outputif test x"${ac_cv_c_tkh}" = x ; then    dnl find the top level Tk source directory    for i in $dirlist; do        if test -n "`ls -dr $srcdir/$i/tk* 2>/dev/null`" ; then	    tkpath=$srcdir/$i	    break	fi    done    dnl find the exact Tk source dir. We do it this way, cause there    dnl might be multiple version of Tk, and we want the most recent one.    for i in `ls -dr $tkpath/tk* 2>/dev/null ` ; do        if test -f $i/generic/tk.h ; then          ac_cv_c_tkh=`(cd $i/generic; pwd)`          break        fi    donefidnl see if one is installedif test x"${ac_cv_c_tkh}" = x ; then    AC_MSG_RESULT(none)    dnl Get the path to the compiler. We do it this way instead of using    dnl AC_CHECK_HEADER, cause this doesn't depend in having X configured.    ccpath=`which ${CC}  | sed -e 's:/bin/.*::'`/include    if test -f $ccpath/tk.h; then	ac_cv_c_tkh=$ccpath    fielse   AC_MSG_RESULT(${ac_cv_c_tkh})fi])  TKHDIR=""if test x"${ac_cv_c_tkh}" = x ; then    AC_MSG_ERROR([Can't find any Tk headers])fiif test x"${ac_cv_c_tkh}" != x ; then    no_tk=""    if test x"${ac_cv_c_tkh}" != x"installed" ; then	if test x"${CC}" = xcl ; then	    tmp="`cygpath --windows ${ac_cv_c_tkh}`"	    ac_cv_c_tkh="`echo $tmp | sed -e s#\\\\\\\\#/#g`"	fi        AC_MSG_RESULT([found in ${ac_cv_c_tkh}])        TKHDIR="-I${ac_cv_c_tkh}"    fifiAC_SUBST(TKHDIR)])AC_DEFUN(CYG_AC_PATH_TKCONFIG, [dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."dnl First, look for one uninstalled.  dnl the alternative search directory is invoked by --with-tkconfigif test x"${no_tk}" = x ; then  dnl we reset no_tk in case something fails here    no_tk=true    AC_ARG_WITH(tkconfig, [  --with-tkconfig           directory containing tk configuration (tkConfig.sh)],         with_tkconfig=${withval})    AC_MSG_CHECKING([for Tk configuration script])    AC_CACHE_VAL(ac_cv_c_tkconfig,[    dnl First check to see if --with-tkconfig was specified.    if test x"${with_tkconfig}" != x ; then        if test -f "${with_tkconfig}/tkConfig.sh" ; then            ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`        else            AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])        fi    fi    dnl next check if it came with Tk configuration file in the source tree    if test x"${ac_cv_c_tkconfig}" = x ; then        for i in $dirlist; do            if test -f $srcdir/$i/unix/tkConfig.sh ; then                ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; pwd)`	        break            fi        done    fi    dnl check in a few other locations    if test x"${ac_cv_c_tkconfig}" = x ; then        dnl find the top level Tk source directory        for i in $dirlist; do            if test -n "`ls -dr $i/tk* 2>/dev/null`" ; then	        tkconfpath=$i	        break	    fi        done        dnl find the exact Tk dir. We do it this way, cause there        dnl might be multiple version of Tk, and we want the most recent one.        for i in `ls -dr $tkconfpath/tk* 2>/dev/null ` ; do            if test -f $i/unix/tkConfig.sh ; then

⌨️ 快捷键说明

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