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

📄 configure.ac

📁 用于2维的射线追踪
💻 AC
字号:
dnl Process this file with autoconf to produce a configure script.AC_INIT(configure.ac)AM_INIT_AUTOMAKE(ray2mesh,1.0)AM_CONFIG_HEADER(config.h)AC_CANONICAL_HOST AC_ISC_POSIXAC_PROG_CCAM_PROG_CC_STDC## the following line is an horrible hack to make a static binary on linux## since libgcc_s.a does not show up and seems not necessary though put in $FLIBSAM_PROG_LEXAC_PROG_YACCAC_SUBST(LEXLIB)AC_CHECK_FUNCS(mallinfo)dnl ------ Tries to build ray2mesh_static (see bin_PROGRAMS in Makefile.am) -----------------AC_ARG_ENABLE(static, [  --enable-static  Try to also generate static binary [default=no]], enable_static="$enableval", enable_static=no)dnl ------Include fotran compatibily libs if libiasp is in fortran-----------------AC_ARG_ENABLE(fortran, [  --enable-fortran  Includes fortran compatibility (needed for fortran iasp) [default=no]], enable_fortan="$enableval", enable_fortran=no)if test x$enable_fortran = xyes ; then      dnl --- this wil output FLIBS -----      AC_F77_LIBRARY_LDFLAGS      #FLIBS=`echo $FLIBS | sed 's/-lgcc_s//g'`       dnl --- previous AC_F77_LIBRARY_LDFLAGS defines FLIBS -------      if test "$F77" = g77; then         F_NO_US=-fno-underscoring      fi      AC_SUBST(F_NO_US)	VMODELLIB="-liasp"else	VMODELLIB="-liaspc -lf2c -lm"fidnl ----- default name for libiasp ---------AC_SUBST(VMODELLIB)dnl ------------------------------------------------------------------------------------- dnl                ray library and headers information  dnl ------------------------------------------------------------------------------------- dnl ---- allows to specify a different prefix PATH for librayAC_ARG_WITH(ray-prefix,            [  --with-ray-prefix=PREFIX Where your libray was installed (e.g. /usr/local/)])	if test -n "${with_ray_prefix}"; then		extra_ld="-L${with_ray_prefix}/lib"		extra_inc="-I${with_ray_prefix}/include"	fidnl ----- now assert if we must check for libs and headers. if test "x${with_ray_prefix}" = "x"; thendnl ---------------------------------------------------------------------dnl                 Checks for ray-descartes dnl ---------------------------------------------------------------------dnl -----------------------------------------------------------------AC_CHECK_LIB(raydescartes,ray3D_descartes,       echo "+------------------------------------------------------------+";       echo "| libraydescartes found. Good. using it.                     |";       echo "+------------------------------------------------------------+",       echo "+------------------------------------------------------------+";       echo "| libraydescartes is badly or not installed. Will not build |";       echo "+------------------------------------------------------------+",	 )dnl ---- check presence of headers AC_CHECK_HEADERS(ray/raydescartes.h,       echo "+------------------------------------------------------------+";	 echo "| headers files for libraydescartes found.                   |";       echo "+------------------------------------------------------------+",       echo "+------------------------------------------------------------+";	 echo "| headers files for libraydescartes not found. Wont build.   |";       echo "+------------------------------------------------------------+")      	 dnl --- assumed to be in the path	 raybinary="raydescartes"else	  raybinary="${with_ray_prefix}/bin/raydescartes"fidnl ---- check for #define'd symbols in libray echo "+---------------------------------------------------------------------------------------+";echo "| Finding DEFINES of libray with ${raybinary} --version ";echo "+---------------------------------------------------------------------------------------+";${raybinary} -v >/dev/null || exit 1ALLOC_MEMORY_CHUNK=`$raybinary -v | tail -1l | sed 's/.*ALLOC_MEMORY_CHUNK/-DALLOC_MEMORY_CHUNK/g'`if test ${ALLOC_MEMORY_CHUNK}= "-DALLOC_MEMORY_CHUNK"; then     extra_defines="-DALLOC_MEMORY_CHUNK";fidnl ------------------------------------------------------------------------------------- dnl                mesh library and headers information  dnl ------------------------------------------------------------------------------------- dnl ---- allows to specify a different prefix PATH for mesh librayAC_ARG_WITH(mesh-prefix,            [  --with-mesh-prefix=PREFIX Where your libmesh was installed (e.g. /usr/local/)])	if test -n "${with_mesh_prefix}"; then		extra_ld="${extra_ld} -L${with_mesh_prefix}/lib"		extra_inc="${extra_inc} -I${with_mesh_prefix}/include"	fidnl ----- now assert if we must check for libs and headers. if test "x${with_mesh_prefix}" = "x"; thendnl ---------------------------------------------------------------------dnl                 Checks for mesh presence dnl ---------------------------------------------------------------------AC_CHECK_LIB(mesh,mesh_init_from_file,       echo "+------------------------------------------------------------+";      echo "| libmesh found. Good. using it.                             |";       echo "+------------------------------------------------------------+",       echo "+------------------------------------------------------------+";       echo "| libmesh is badly or not installed. Will not build !        |";       echo "+------------------------------------------------------------+",	 )dnl ---- check presence of headers AC_CHECK_HEADERS(mesh/mesh.h,       echo "+------------------------------------------------------------+";	 echo "| headers files for libmesh found.                           |";       echo "+------------------------------------------------------------+",       echo "+------------------------------------------------------------+";	 echo "| headers files for libmesh not found. Wont build.           |";       echo "+------------------------------------------------------------+")fidnl ---------------------------------------------------------------------dnl                 MPI information dnl ---------------------------------------------------------------------AC_ARG_WITH(mpi-cc,[  --with-mpi-cc=NAME of compiler to build with MPI (e.g. mpicc or cc). Will override CC variable.])if test -n "${with_mpi_cc}"; then	      MPI="-DUSE_MPI"	      extra_defines="${extra_defines} ${MPI}"	      CC=${with_mpi_cc}fidnl ---------------------------------------------------------------------AC_ARG_WITH(mpi-prefix,            [  --with-mpi-prefix=PREFIX Where MPI was installed (to be used with --with-mpi-name). Also sets PREFIX/bin/mpicc as compiler])if test -n "${with_mpi_prefix}"; then		extra_ld="${extra_ld} -L${with_mpi_prefix}/lib -l${with_mpi_name}"		extra_inc="${extra_inc} -I${with_mpi_prefix}/include"fidnl ---------------------------------------------------------------------AC_ARG_WITH(mpi-name,[  --with-mpi-name=NAME of MPI library to use (e.g. mpi or mpich).])if test -n "${with_mpi_name}"; then	      MPI="-DUSE_MPI"	      extra_defines="${extra_defines} ${MPI}"              extra_ld="${extra_ld} -l${with_mpi_name}"	      AC_SUBST(MPI)fidnl ----------------------ZLIB---------------------------------------AC_ARG_WITH(zlib-prefix,            [  --with-zlib-prefix=PREFIX Where zlib was installed.])if test -n "${with_zlib_prefix}"; then		extra_ld="${extra_ld} -L${with_zlib_prefix}/lib -lz"		extra_inc="${extra_inc} -I${with_zlib_prefix}/include"                ZLIB="-DUSE_ZLIB"		extra_defines="${extra_defines} ${ZLIB}"                AC_SUBST(ZLIB)fiAC_ARG_ENABLE(zlib,[  --enable-zlib : use zlib compression for communications in the merge phase],ZLIB="-DUSE_ZLIB";extra_ld="${extra_ld} -lz";extra_defines="${extra_defines} ${ZLIB}";AC_SUBST(ZLIB))dnl ----------------------MASTER/SLAVE---------------------------------------AC_ARG_ENABLE(ms,[  --enable-ms : Use the master-slave paradigm in the parallel implementation (requires MPI)],if test "x$MPI" != "x"; then	  MASTER_SLAVE="-DMASTER_SLAVE";          extra_defines="${extra_defines} ${MASTER_SLAVE}"fi)dnl ----------------------RAYTRACING_ONLY---------------------------------------AC_ARG_ENABLE(rayonly,[  --enable-rayonly : Disable mesh making process (just does raytracing)],	  RAYTRACING_ONLY="-DRAYTRACING_ONLY";extra_defines="${extra_defines} -DRAYTRACING_ONLY")dnl ----------------------Warning flags---------------------------------------case "${host}" in   i[[3456]]86-*-linux-gnu*)          syst="Linux"          extra_inc="${extra_inc} -Wall"   ;;   mip*-*-irix*)          syst="Irix"          extra_inc="${extra_inc} -I/usr/freeware/include"          extra_ld="${extra_ld} -L/usr/freeware/lib32"   ;;   powerpc-apple*)      extra_inc="${extra_inc} -I/sw/include"      extra_ld="${extra_ld} -L/sw/lib"   ;;esacdnl ---------------- Documentation generation ----------------------------------DOC_GENERATOR=true ## later write a macro to see if doxygen is there                                                                                                 dnl Let people disable the doxygen doc generation.AC_ARG_ENABLE(doc, [  --enable-doc : Use doc to build doxygen documentation [default=no]], enable_doc="$enableval", enable_doc=no)                                                                                                 if test x$enable_doc = xyes ; then    if test x$DOC_GENERATOR = xtrue ; then      enable_doc=yes   else      enable_doc=no   fifiAM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)AM_CONDITIONAL(ENABLE_DOC, test x$enable_doc = xyes)AC_SUBST(extra_inc)AC_SUBST(extra_ld)AC_SUBST(extra_defines)echo "--------------------------Summary-----------------------------"echo " System                : ${syst}"echo " C compiler invocation : ${CC}                       "echo " C Flags               : ${CFLAGS} ${extra_inc}      "echo " LD flags              : ${LD_ADD} ${extra_ld}       "echo " defines               : ${extra_defines}             "echo " What defines mean :"for i in RAYTRACING_ONLY MPI MASTER_SLAVE ZLIB ALLOC_MEMORY_CHUNKdo if test "x${i}" != "x"; then   echo " *$i will be used (defined ${i})"fidoneecho "--------------------------------------------------------------"echo " Velocity model lib    : ${VMODELLIB}  "  if test x$enable_fortran = xyes ; then     echo " Fortran compatibilty  : ${FLIBS}                      "   fiecho "--------------------------------------------------------------"if test "x${extra_ld}" != "x"; then   echo " Make sure"   echo " ${with_ray_prefix} ${with_mesh_prefix} ${with_mpi_prefix}"   echo " is in your LD_LIBRARY_PATH before running $PACKAGE"fiecho "--------------------------------------------------------------"AC_OUTPUT([ray2mesh.specMakefiledoc/Makefiledoc/html/Makefilesrc/Makefileshare/Makefile])

⌨️ 快捷键说明

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