acinclude.m4

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

M4
1,996
字号
fiAC_SUBST(SIMHDIR)dnl See whether it's a devo or Foundry branch simulatorAC_MSG_CHECKING(Whether this is a devo simulator )AC_CACHE_VAL(ac_cv_c_simdevo,[    CPPFLAGS="$CPPFLAGS $SIMHDIR"    AC_EGREP_HEADER([SIM_DESC sim_open.*struct _bfd], remote-sim.h,        ac_cv_c_simdevo=yes,        ac_cv_c_simdevo=no)])if test x"$ac_cv_c_simdevo" = x"yes" ; then    AC_DEFINE(HAVE_DEVO_SIM)fiAC_MSG_RESULT(${ac_cv_c_simdevo})AC_SUBST(HAVE_DEVO_SIM)dnl Next look for the libraryAC_MSG_CHECKING(for the simulator library)AC_CACHE_VAL(ac_cv_c_simlib,[for i in $dirlist; do    if test -f "$i/sim/$target_dir/Makefile" ; then	ac_cv_c_simlib=`(cd $i/sim/$target_dir; pwd)`    fidone])if test x"${ac_cv_c_simlib}" != x; then    SIMLIB="-L${ac_cv_c_simlib}"else    AC_MSG_RESULT(none)    dnl FIXME: this is kinda bogus, cause umtimately the TM will build    dnl all the libraries for several architectures. But for now, this    dnl will work till then.dnl     AC_MSG_CHECKING(for the simulator installed with the compiler libraries)    dnl Transform the name of the compiler to it's cross variant, unless    dnl CXX is set. This is also what CXX gets set to in the generated    dnl Makefile.    CROSS_GCC=`echo gcc | sed -e "s/^/$target/"`    dnl Get G++'s full path to libgcc.achangequote(,)    gccpath=`${CROSS_GCC} --print-libgcc | sed -e 's:[a-z0-9A-Z\.\-]*/libgcc.a::' -e 's:lib/gcc-lib/::'`libchangequote([,])    if test -f $gccpath/libsim.a -o -f $gccpath/libsim.so ; then        ac_cv_c_simlib="$gccpath/"        SIMLIB="-L${ac_cv_c_simlib}"	AC_MSG_RESULT(${ac_cv_c_simlib})    else        AM_CONDITIONAL(PSIM, test x$psim = xno)	SIMLIB=""	AC_MSG_RESULT(none)dnl         ac_cv_c_simlib=none    fifiAC_SUBST(SIMLIB)])dnl ====================================================================dnl Find the libiberty library.AC_DEFUN(CYG_AC_PATH_LIBIBERTY, [AC_MSG_CHECKING(for the libiberty library in the build tree)dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."AC_CACHE_VAL(ac_cv_c_libib,[for i in $dirlist; do    if test -f "$i/libiberty/Makefile" ; then	ac_cv_c_libib=`(cd $i/libiberty/; pwd)`    fidone])if test x"${ac_cv_c_libib}" != x; then    LIBIBERTY="-L${ac_cv_c_libib}"    AC_MSG_RESULT(${ac_cv_c_libib})else    AC_MSG_RESULT(none)fiAC_SUBST(LIBIBERTY)])dnl ====================================================================AC_DEFUN(CYG_AC_PATH_DEVO, [AC_MSG_CHECKING(for devo headers in the source tree)dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."AC_CACHE_VAL(ac_cv_c_devoh,[for i in $dirlist; do    if test -f "${srcdir}/$i/include/remote-sim.h" ; then	ac_cv_c_devoh=`(cd ${srcdir}/$i/include; pwd)`    fidone])if test x"${ac_cv_c_devoh}" != x; then    DEVOHDIR="-I${ac_cv_c_devoh}"    AC_MSG_RESULT(${ac_cv_c_devoh})else    AC_MSG_RESULT(none)fiAC_SUBST(DEVOHDIR)])dnl ====================================================================dnl find the IDE library and headers.AC_DEFUN(CYG_AC_PATH_IDE, [AC_MSG_CHECKING(for IDE headers in the source tree)dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."IDEHDIR=IDELIB=AC_CACHE_VAL(ac_cv_c_ideh,[for i in $dirlist; do    if test -f "${srcdir}/$i/libide/src/event.h" ; then	ac_cv_c_ideh=`(cd ${srcdir}/$i/libide/src; pwd)`;    fidone])if test x"${ac_cv_c_ideh}" != x; then    IDEHDIR="-I${ac_cv_c_ideh}"    AC_MSG_RESULT(${ac_cv_c_ideh})else    AC_MSG_RESULT(none)fiAC_MSG_CHECKING(for LIBIDE TCL headers in the source tree)AC_CACHE_VAL(ac_cv_c_idetclh,[for i in $dirlist; do    if test -f "${srcdir}/$i/libidetcl/src/idetcl.h" ; then	ac_cv_c_idetclh=`(cd ${srcdir}/$i/libidetcl/src; pwd)`;    fidone])if test x"${ac_cv_c_idetclh}" != x; then    IDEHDIR="${IDEHDIR} -I${ac_cv_c_idetclh}"    AC_MSG_RESULT(${ac_cv_c_idetclh})else    AC_MSG_RESULT(none)fiAC_MSG_CHECKING(for IDE headers in the build tree)AC_CACHE_VAL(ac_cv_c_ideh2,[for i in $dirlist; do    if test -f "$i/libide/src/Makefile" ; then	ac_cv_c_ideh2=`(cd $i/libide/src; pwd)`;    fidone])if test x"${ac_cv_c_ideh2}" != x; then    IDEHDIR="${IDEHDIR} -I${ac_cv_c_ideh2}"    AC_MSG_RESULT(${ac_cv_c_ideh2})else    AC_MSG_RESULT(none)fidnl look for the libraryAC_MSG_CHECKING(for IDE library)AC_CACHE_VAL(ac_cv_c_idelib,[if test x"${ac_cv_c_idelib}" = x ; then    for i in $dirlist; do      if test -f "$i/libide/src/Makefile" ; then        ac_cv_c_idelib=`(cd $i/libide/src; pwd)`        break      fi    donefi]) if test x"${ac_cv_c_idelib}" != x ; then     IDELIB="-L${ac_cv_c_idelib}"     AC_MSG_RESULT(${ac_cv_c_idelib})else     AC_MSG_RESULT(none)fidnl find libiddetcl.a if it existsAC_MSG_CHECKING(for IDE TCL library)AC_CACHE_VAL(ac_cv_c_idetcllib,[if test x"${ac_cv_c_idetcllib}" = x ; then    for i in $dirlist; do      if test -f "$i/libidetcl/src/Makefile" ; then        ac_cv_c_idetcllib=`(cd $i/libidetcl/src; pwd)`        break      fi    donefi]) if test x"${ac_cv_c_idetcllib}" != x ; then     IDELIB="${IDELIB} -L${ac_cv_c_idetcllib}"     IDETCLLIB="-lidetcl"     AC_MSG_RESULT(${ac_cv_c_idetcllib})else     AC_MSG_RESULT(none)fiAC_SUBST(IDEHDIR)AC_SUBST(IDELIB)AC_SUBST(IDETCLLIB)])dnl ====================================================================dnl Find all the ILU headers and librariesAC_DEFUN(CYG_AC_PATH_ILU, [AC_MSG_CHECKING(for ILU kernel headers in the source tree)dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."AC_CACHE_VAL(ac_cv_c_iluh,[for i in $dirlist; do    if test -f "${srcdir}/$i/ilu/runtime/kernel/method.h" ; then	ac_cv_c_iluh=`(cd ${srcdir}/$i/ilu/runtime/kernel; pwd)`    fidone])if test x"${ac_cv_c_iluh}" != x; then    ILUHDIR="-I${ac_cv_c_iluh}"    AC_MSG_RESULT(${ac_cv_c_iluh})else    AC_MSG_RESULT(none)fiAC_MSG_CHECKING(for ILU kernel headers in the build tree)dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."AC_CACHE_VAL(ac_cv_c_iluh5,[for i in $dirlist; do    if test -f "$i/ilu/runtime/kernel/iluconf.h" ; then	ac_cv_c_iluh5=`(cd $i/ilu/runtime/kernel; pwd)`    fidone])if test x"${ac_cv_c_iluh5}" != x; then    ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh5}"    AC_MSG_RESULT(${ac_cv_c_iluh5})else    AC_MSG_RESULT(none)fiAC_MSG_CHECKING(for ILU C++ headers in the source tree)AC_CACHE_VAL(ac_cv_c_iluh2,[for i in $dirlist; do    if test -f "${srcdir}/$i/ilu/stubbers/cpp/resource.h" ; then	ac_cv_c_iluh2=`(cd ${srcdir}/$i/ilu/stubbers/cpp; pwd)`    fidone])if test x"${ac_cv_c_iluh2}" != x; then    ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh2}"    AC_MSG_RESULT(${ac_cv_c_iluh2})else    AC_MSG_RESULT(none)fiAC_MSG_CHECKING(for ILU C headers)AC_CACHE_VAL(ac_cv_c_iluh3,[for i in $dirlist; do    if test -f "${srcdir}/$i/ilu/stubbers/c/resource.h" ; then	ac_cv_c_iluh3=`(cd ${srcdir}/$i/ilu/stubbers/c  ; pwd)`    fidone])if test x"${ac_cv_c_iluh3}" != x; then    ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh3}"    AC_MSG_RESULT(${ac_cv_c_iluh3})else    AC_MSG_RESULT(none)fiAC_MSG_CHECKING(for ILU C runtime headers)AC_CACHE_VAL(ac_cv_c_iluh4,[for i in $dirlist; do    if test -f "${srcdir}/$i/ilu/runtime/c/ilucstub.h" ; then	ac_cv_c_iluh4=`(cd ${srcdir}/$i/ilu/runtime/c  ; pwd)`    fidone])if test x"${ac_cv_c_iluh4}" != x; then    ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh4}"    AC_MSG_RESULT(${ac_cv_c_iluh4})else    AC_MSG_RESULT(none)fiAC_CACHE_VAL(ac_cv_c_ilupath,[for i in $dirlist; do    if test -f "$i/ilu/Makefile" ; then	ac_cv_c_ilupath=`(cd $i/ilu; pwd)`	break    fidone])ILUTOP=${ac_cv_c_ilupath}AC_MSG_CHECKING(for the ILU library in the build tree)AC_CACHE_VAL(ac_cv_c_ilulib,[if test -f "$ac_cv_c_ilupath/runtime/kernel/Makefile" ; then    ac_cv_c_ilulib=`(cd $ac_cv_c_ilupath/runtime/kernel; pwd)`    AC_MSG_RESULT(found ${ac_cv_c_ilulib}/libilu.a)else    AC_MSG_RESULT(no)fi])   AC_MSG_CHECKING(for the ILU C++ bindings library in the build tree)AC_CACHE_VAL(ac_cv_c_ilulib2,[if test -f "$ac_cv_c_ilupath/runtime/cpp/Makefile" ; then    ac_cv_c_ilulib2=`(cd $ac_cv_c_ilupath/runtime/cpp; pwd)`    AC_MSG_RESULT(found ${ac_cv_c_ilulib2}/libilu-c++.a)else    AC_MSG_RESULT(no)fi])AC_MSG_CHECKING(for the ILU C bindings library in the build tree)AC_CACHE_VAL(ac_cv_c_ilulib3,[if test -f "$ac_cv_c_ilupath/runtime/c/Makefile" ; then    ac_cv_c_ilulib3=`(cd $ac_cv_c_ilupath/runtime/c; pwd)`    AC_MSG_RESULT(found ${ac_cv_c_ilulib3}/libilu-c.a)else    AC_MSG_RESULT(no)fi])AC_MSG_CHECKING(for the ILU Tk bindings library in the build tree)AC_CACHE_VAL(ac_cv_c_ilulib4,[if test -f "$ac_cv_c_ilupath/runtime/mainloop/Makefile" ; then    ac_cv_c_ilulib4=`(cd $ac_cv_c_ilupath/runtime/mainloop; pwd)`    AC_MSG_RESULT(found ${ac_cv_c_ilulib4}/libilu-tk.a)else    AC_MSG_RESULT(no)fi])if test x"${ac_cv_c_ilulib}" = x -a x"${ac_cv_c_ilulib2}" = x; then  ILUHDIR=""fiif test x"${ac_cv_c_ilulib}" != x -a x"${ac_cv_c_ilulib2}" != x; then    ILULIB="-L${ac_cv_c_ilulib} -L${ac_cv_c_ilulib2} -L${ac_cv_c_ilulib3} -L${ac_cv_c_ilulib4}"else    ILULIB=""fiif test x"${ILULIB}" = x; then    AC_MSG_CHECKING(for ILU libraries installed with the compiler)    AC_CACHE_VAL(ac_cv_c_ilulib5,[    NATIVE_GCC=`echo gcc | sed -e "${program_transform_name}"`    dnl Get G++'s full path to it's libraries    ac_cv_c_ilulib5=`${NATIVE_GCC} --print-libgcc | sed -e 's:lib/gcc-lib/.*::'`lib    if test -f $ac_cv_c_ilulib5/libilu-c.a -o -f $ac_cv_c_ilulib5/libilu-c.so ; then        if test x"${ILUHDIR}" = x; then               ILUHDIR="-I${ac_cv_c_ilulib5}/../include"        fi        ILULIB="-L${ac_cv_c_ilulib5}"        AC_MSG_RESULT(${ac_cv_c_ilulib5})    else        ac_cv_c_ilulib=none        AC_MSG_RESULT(none)    fifi])AC_SUBST(ILUHDIR)AC_SUBST(ILULIB)AC_SUBST(ILUTOP)])dnl ====================================================================dnl This defines the byte order for the host. We can't usednl AC_C_BIGENDIAN, cause we want to create a config file anddnl substitue the real value, so the header files work rightAC_DEFUN(CYG_AC_C_ENDIAN, [AC_MSG_CHECKING(to see if this is a little endian host)AC_CACHE_VAL(ac_cv_c_little_endian, [ac_cv_c_little_endian=unknown# See if sys/param.h defines the BYTE_ORDER macro.AC_TRY_COMPILE([#include <sys/types.h>#include <sys/param.h>], [#if !BYTE_ORDER || !_BIG_ENDIAN || !_LITTLE_ENDIAN bogus endian macros#endif], [# It does; now see whether it defined to _LITTLE_ENDIAN or not.AC_TRY_COMPILE([#include <sys/types.h>#include <sys/param.h>], [#if BYTE_ORDER != _LITTLE_ENDIAN not big endian#endif], ac_cv_c_little_endian=yes, ac_cv_c_little_endian=no)])if test ${ac_cv_c_little_endian} = unknown; thenold_cflags=$CFLAGSCFLAGS=-gAC_TRY_RUN([main () {  /* Are we little or big endian?  From Harbison&Steele.  */  union  {    long l;    char c[sizeof (long)];  } u;  u.l = 1;  exit (u.c[0] == 1);}],ac_cv_c_little_endian=no,ac_cv_c_little_endian=yes,[dnl Yes, this is ugly, and only used for a canadian cross anyway. Thisdnl is just to keep configure from stopping here.case "${host}" inchangequote(,)   i[3456]86-*-*) ac_cv_c_little_endian=yes ;;   sparc*-*-*)    ac_cv_c_little_endian=no ;;changequote([,])  *)    AC_MSG_WARN(Can't cross compile this test) ;;esac])CFLAGS=$old_cflagsfi])if test x"${ac_cv_c_little_endian}" = xyes; then    AC_DEFINE(LITTLE_ENDIAN_HOST)

⌨️ 快捷键说明

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