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

📄 aclocal.m4

📁 这个是LINUX下的GDB调度工具的源码
💻 M4
📖 第 1 页 / 共 2 页
字号:
dnl This file is duplicated in four places:dnl * gdb/aclocal.m4dnl * gdb/testsuite/aclocal.m4dnl * expect/aclocal.m4dnl * dejagnu/aclocal.m4dnl Consider modifying all copies in parallel.dnl written by Rob Savoye <rob@cygnus.com> for Cygnus Supportdnl CYGNUS LOCAL: This gets the right posix flag for gccAC_DEFUN(CY_AC_TCL_LYNX_POSIX,[AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])AC_MSG_CHECKING([to see if this is LynxOS])AC_CACHE_VAL(ac_cv_os_lynx,[AC_EGREP_CPP(yes,[/* * The old Lynx "cc" only defines "Lynx", but the newer one uses "__Lynx__" */#if defined(__Lynx__) || defined(Lynx)yes#endif], ac_cv_os_lynx=yes, ac_cv_os_lynx=no)])#if test "$ac_cv_os_lynx" = "yes" ; then  AC_MSG_RESULT(yes)  AC_DEFINE(LYNX)  AC_MSG_CHECKING([whether -mposix or -X is available])  AC_CACHE_VAL(ac_cv_c_posix_flag,  [AC_TRY_COMPILE(,[  /*   * This flag varies depending on how old the compiler is.   * -X is for the old "cc" and "gcc" (based on 1.42).   * -mposix is for the new gcc (at least 2.5.8).   */  #if defined(__GNUC__) && __GNUC__ >= 2  choke me  #endif  ], ac_cv_c_posix_flag=" -mposix", ac_cv_c_posix_flag=" -X")])  CC="$CC $ac_cv_c_posix_flag"  AC_MSG_RESULT($ac_cv_c_posix_flag)  else  AC_MSG_RESULT(no)fi])AC_DEFUN(CY_AC_PATH_TCLH, [## Ok, lets find the tcl source trees so we can use the headers# Warning: transition of version 9 to 10 will break this algorithm# because 10 sorts before 9. We also look for just tcl. We have to# be careful that we don't match stuff like tclX by accident.# the alternative search directory is involked by --with-tclinclude#no_tcl=trueAC_MSG_CHECKING(for Tcl private headers)AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory where tcl private headers are], with_tclinclude=${withval})AC_CACHE_VAL(ac_cv_c_tclh,[# first check to see if --with-tclinclude was specifiedif test x"${with_tclinclude}" != x ; then  if test -f ${with_tclinclude}/tclInt.h ; then    ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`  else    AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers])  fifi# next check in private source directory## since ls returns lowest version numbers first, reverse its outputif test x"${ac_cv_c_tclh}" = x ; then  for i in \		${srcdir}/../tcl \		`ls -dr ${srcdir}/../tcl[[0-9]]* 2>/dev/null` \		${srcdir}/../../tcl \		`ls -dr ${srcdir}/../../tcl[[0-9]]* 2>/dev/null` \		${srcdir}/../../../tcl \		`ls -dr ${srcdir}/../../../tcl[[0-9]]* 2>/dev/null ` ; do    if test -f $i/tclInt.h ; then      ac_cv_c_tclh=`(cd $i; pwd)`      break    fi    # Tcl 7.5 and greater puts headers in subdirectory.    if test -f $i/generic/tclInt.h ; then      ac_cv_c_tclh=`(cd $i; pwd)`/generic      break    fi  donefi# finally check in a few common install locations## since ls returns lowest version numbers first, reverse its outputif test x"${ac_cv_c_tclh}" = x ; then  for i in \		`ls -dr /usr/local/src/tcl[[0-9]]* 2>/dev/null` \		`ls -dr /usr/local/lib/tcl[[0-9]]* 2>/dev/null` \		/usr/local/src/tcl \		/usr/local/lib/tcl \		${prefix}/include ; do    if test -f $i/tclInt.h ; then      ac_cv_c_tclh=`(cd $i; pwd)`      break    fi  donefi# see if one is installedif test x"${ac_cv_c_tclh}" = x ; then   AC_HEADER_CHECK(tclInt.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")fi])if test x"${ac_cv_c_tclh}" = x ; then  TCLHDIR="# no Tcl private headers found"  AC_MSG_ERROR([Can't find Tcl private headers])fiif test x"${ac_cv_c_tclh}" != x ; then  no_tcl=""  if test x"${ac_cv_c_tclh}" = x"installed" ; then    AC_MSG_RESULT([is installed])    TCLHDIR=""  else    AC_MSG_RESULT([found in ${ac_cv_c_tclh}])    # this hack is cause the TCLHDIR won't print if there is a "-I" in it.    TCLHDIR="-I${ac_cv_c_tclh}"  fifiAC_MSG_CHECKING([Tcl version])orig_includes="$CPPFLAGS"if test x"${TCLHDIR}" != x ; then  CPPFLAGS="$CPPFLAGS $TCLHDIR"fi# Get major and minor versions of Tcl.  Use funny names to avoid# clashes with eg SunOS.cat > conftest.c <<'EOF'#include "tcl.h"MaJor = TCL_MAJOR_VERSIONMiNor = TCL_MINOR_VERSIONEOFtclmajor=tclminor=if (eval "$CPP $CPPFLAGS conftest.c") 2>/dev/null >conftest.out; then   # Success.   tclmajor=`egrep '^MaJor = ' conftest.out | sed -e 's/^MaJor = *//' -e 's/ *$//'`   tclminor=`egrep '^MiNor = ' conftest.out | sed -e 's/^MiNor = *//' -e 's/ *$//'`firm -f conftest.c conftest.outif test -z "$tclmajor" || test -z "$tclminor"; then   AC_MSG_RESULT([fatal error: could not find major or minor version number of Tcl])   exit 1fiAC_MSG_RESULT(${tclmajor}.${tclminor})CPPFLAGS="${orig_includes}"AC_PROVIDE([$0])AC_SUBST(TCLHDIR)])AC_DEFUN(CY_AC_PATH_TCLLIB, [## Ok, lets find the tcl library# First, look for one uninstalled.  # the alternative search directory is invoked by --with-tcllib#if test $tclmajor -ge 7 -a $tclminor -ge 4 ; then  installedtcllibroot=tcl$tclversionelse  installedtcllibroot=tclfiif test x"${no_tcl}" = x ; then  # we reset no_tcl incase something fails here  no_tcl=true  AC_ARG_WITH(tcllib, [  --with-tcllib           directory where the tcl library is],         with_tcllib=${withval})  AC_MSG_CHECKING([for Tcl library])  AC_CACHE_VAL(ac_cv_c_tcllib,[  # First check to see if --with-tcllib was specified.  # This requires checking for both the installed and uninstalled name-styles  # since we have no idea if it's installed or not.  if test x"${with_tcllib}" != x ; then    if test -f "${with_tcllib}/lib$installedtcllibroot.so" ; then      ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.so    elif test -f "${with_tcllib}/libtcl.so" ; then      ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.so    # then look for a freshly built statically linked library    # if Makefile exists we assume its configured and libtcl will be built first.    elif test -f "${with_tcllib}/lib$installedtcllibroot.a" ; then      ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.a    elif test -f "${with_tcllib}/libtcl.a" ; then      ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.a    else      AC_MSG_ERROR([${with_tcllib} directory doesn't contain libraries])    fi  fi  # then check for a private Tcl library  # Since these are uninstalled, use the simple lib name root.  if test x"${ac_cv_c_tcllib}" = x ; then    for i in \		../tcl \		`ls -dr ../tcl[[0-9]]* 2>/dev/null` \		../../tcl \		`ls -dr ../../tcl[[0-9]]* 2>/dev/null` \		../../../tcl \		`ls -dr ../../../tcl[[0-9]]* 2>/dev/null` ; do      # Tcl 7.5 and greater puts library in subdir.  Look there first.      if test -f "$i/unix/libtcl.so" ; then	 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so	 break      elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then	 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a	 break      # look for a freshly built dynamically linked library      elif test -f "$i/libtcl.so" ; then        ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so	break      # then look for a freshly built statically linked library      # if Makefile exists we assume its configured and libtcl will be      # built first.      elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then        ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a	break      fi    done  fi  # check in a few common install locations  if test x"${ac_cv_c_tcllib}" = x ; then    for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do      # first look for a freshly built dynamically linked library      if test -f "$i/lib$installedtcllibroot.so" ; then        ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.so	break      # then look for a freshly built statically linked library      # if Makefile exists we assume its configured and libtcl will be built first.      elif test -f "$i/lib$installedtcllibroot.a" -o -f "$i/Makefile" ; then        ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.a	break      fi    done  fi  # check in a few other private locations  if test x"${ac_cv_c_tcllib}" = x ; then    for i in \		${srcdir}/../tcl \		`ls -dr ${srcdir}/../tcl[[0-9]]* 2>/dev/null` ; do      # Tcl 7.5 and greater puts library in subdir.  Look there first.      if test -f "$i/unix/libtcl.so" ; then	 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so	 break      elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then	 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a	 break      # look for a freshly built dynamically linked library      elif test -f "$i/libtcl.so" ; then        ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so	break      # then look for a freshly built statically linked library      # if Makefile exists we assume its configured and libtcl will be      # built first.      elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then        ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a	break      fi    done  fi  # see if one is conveniently installed with the compiler  if test x"${ac_cv_c_tcllib}" = x ; then	    orig_libs="$LIBS"    LIBS="$LIBS -l$installedtcllibroot -lm"        AC_TRY_RUN([    Tcl_AppInit()    { exit(0); }], ac_cv_c_tcllib="-l$installedtcllibroot", ac_cv_c_tcllib=""    , ac_cv_c_tclib="-l$installedtcllibroot")    LIBS="${orig_libs}"   fi  ])  if test x"${ac_cv_c_tcllib}" = x ; then    TCLLIB="# no Tcl library found"    AC_MSG_WARN(Can't find Tcl library)  else    TCLLIB=${ac_cv_c_tcllib}    AC_MSG_RESULT(found $TCLLIB)    no_tcl=  fifiAC_PROVIDE([$0])AC_SUBST(TCLLIB)])

⌨️ 快捷键说明

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