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

📄 configure.ac

📁 FreeFem++可以生成高质量的有限元网格。可以用于流体力学
💻 AC
📖 第 1 页 / 共 3 页
字号:
then  with_suffix=""elif test "$with_suffix" = no -o -z "$with_suffix" then  with_suffix=""else  with_suffix="-$with_suffix"fi  AC_MSG_CHECKING(add suffix $with_suffix )	  AC_SUBST(ADD_PACKAGE_NAME,$with_suffix)  AC_MSG_RESULT(yes)# Checking wether we can produce a parallel version# -------------------------------------------------# We need to choose between mpich and lam for the Debian packageAC_ARG_WITH(mpi,[  --with-mpi=[yes/no/mpiCC/mpic++/... ]	or --without-mpi	Choose MPI implementation (default is mpich)])# Default is mpichif test "$with_mpi" = yes -o -z "$with_mpi" then   ff_mpicxx=mpiCCelse   case "$with_mpi" in lam|mpich)   ff_mpicxx=mpiCC.$with_mpi;; *)  ff_mpicxx="$with_mpi" ;; esacfiif test "$with_mpi" != nothen	AC_MSG_CHECKING(for $ff_mpicxx)	ff_save_cxx="$CXX"	CXX=$ff_mpicxx	AC_LINK_IFELSE([#include <mpi.h>#include <stdio.h>int main(int argc,char **argv){  char name[[BUFSIZ]];  int length;    MPI_Init(&argc, &argv);  MPI_Get_processor_name(name, &length);  printf("%s: hello world\n", name);  MPI_Finalize();  return 0;}],ff_mpi=yes,ff_mpi=no)	AC_MSG_RESULT($ff_mpi)	# Also check that mpirun is there. If it isn't, then MPI is	# not fully installed.	if test "$ff_mpi" = yes;	then		AC_CHECK_PROG(ff_mpirun,mpirun,yes,no)		if test "$ff_mpirun" = no		then			ff_mpi=no		fi	fi	if test "$ff_mpi" = yes;	then		# We do not AC_DEFINE any special flag for parallel		# computation here, because it must only be set when the 		# parallel program is compiled (see src/mpi/Makfile.am)        AC_CHECK_HEADERS(mpicxx.h mpi/cxx/mpicxx.h ompi/mpi/cxx/mpicxx.h openmpi/ompi/mpi/cxx/mpicxx.h mpi++.h, ff_mpicxx_include=yes)##                AC_CHECK_HEADER(mpicxx.h,#                        AC_DEFINE(HAVE_MPICXX_H,1, mpicxx.h  have include file))#                AC_CHECK_HEADER(mpi/cxx/mpicxx.h,#                        AC_DEFINE(HAVE_MPI_CXX_MPICXX_H,1, mpi/cxx/mpicxx.h  have include file))#                AC_CHECK_HEADER(ompi/mpi/cxx/mpicxx.h,#                        AC_DEFINE(HAVE_OMPI_MPI_CXX_MPICXX_H,1, ompi/mpi/cxx/mpicxx.h  have include file))#                AC_CHECK_HEADER(openmpi/ompi/mpi/cxx/mpicxx.h,#                        AC_DEFINE(HAVE_OPENMPI_OMPI_MPI_CXX_MPICXX_H,1, ompi/mpi/cxx/mpicxx.h  have include file))##                AC_CHECK_HEADER(mpi++.h,#                        AC_DEFINE(HAVE_MPICPP_H,1, mpi++.h  have include file))		ff_mpiprog="FreeFem++-mpi${EXEEXT}"		if test "$ff_mpicxx_include" = yes ; then   		  AC_SUBST(MPIPROG,$ff_mpiprog)                  AC_SUBST(MPICXX,$ff_mpicxx)		else		  ff_mpi=no	          AC_SUBST(MPICXX,$ff_save_cxx)		fi	else	        AC_SUBST(MPICXX,$ff_save_cxx)	fi	CXX="$ff_save_cxx"fi# Looking for useful configuration utilities# ------------------------------------------#getting utility software archives through the internetAC_ARG_ENABLE(generic_blas,[  --enable-generic_blas	Download generic blas (implie --enable-download)])AC_ARG_ENABLE(download,[  --enable-download	Download missing libraries (BLAS,ARPACK,UMFPACK,FLTK)])#replacing wget with another commandff_wget_command=wgetff_wget=noAC_ARG_WITH(wget,	[  --with-wget=command	Replace "wget" with another command. Implies --enable-download],	   enable_download=yes	   ff_wget=yes	   ff_wget_command="${withval}")if test "$enable_generic_blas" = yesthen	enable_download=yesfi#  echo " ----------- $enable_download --"# if enabling downloads find wget or curl to do download # ------------------------------------------------------if test  "$ff_wget" =  no then	ff_wget=""		AC_CHECK_PROG(ff_wget,wget,yes,no)fi	if test  "$ff_wget" = no then        ff_wget_command="curl -O"  	ff_curl=""	AC_CHECK_PROG(ff_curl,curl -O,yes,no)	ff_wget="$ff_curl"fi# for automatique compilation of # lib in download if test  "$ff_wget" != yes  -a "$enable_download"  = "yes"  ; then  enable_download=no  AC_MSG_ERROR([   enable-download and no wget or curl. ],1);  fiif test "$enable_download"  = "yes" ; thenDOWNLOADCOMPILE=compile-pkgelseDOWNLOADCOMPILE=fi AC_SUBST(WGET,$ff_wget_command)AC_SUBST(DOWNLOADCOMPILE,$DOWNLOADCOMPILE)#  modif FH -----#  -- looking for cadna  #  the round-off error propagation # the web site http://www-anp.lip6.fr/cadna/#  --------------------AC_ARG_WITH(cadna,[  --with-cadna= cadna library --without-cadna  ])if test "$with_cadna" != no -o -n  "$with_cadna"    then     ff_cadna="$with_cadna"fiff_cadna_ok=noif test "$with_cadna" != no      then     ff_libs_old="$LIBS"    ff_ldflags_old="$LDFLAGS"    ff_cadna_dir="${curdir}/download/cadna"    LDFLAGS="$LDFLAGS -L$ff_cadna_dir"    AC_CHECK_LIB(cadnafree,arit_zero,	ff_cadna_ok=yes)    AC_CHECK_HEADERS(${ff_cadna_dir}/cadnafree.h,	ff_cadna_h=yes, ff_cadna_h=no)        LIBS="$ff_libs_old"    LDFLAGS="$ff_ldflags_old"            if test "$ff_cadna_ok" = yes  -a "$ff_cadna_h" = yes 	then	AC_DEFINE(HAVE_CADNA,1, freecadna is use to evalute the round-off error propagation )	CPPFLAGS="$CPPFLAGS -I$ff_cadna_dir"	LIBS=" -L$ff_cadna_dir -lcadnafree $ff_libs_old"    else	AC_MSG_NOTICE([ without cadna ***** ])    fielse    AC_MSG_NOTICE([ without cadna ***** ])fi# Looking for the FFTW3# --------------------ff_fftw_ok=noff_libs_old="$LIBS"ff_ldflags_old="$LDFLAGS"ff_cppflags_old="$CPPFLAGS"for ff_fftw_dir in "" "${curdir}/download/install";do   if test "$ff_fftw_ok" = no	then	  if test -n "$ff_fftw_dir"	  then           LDFLAGS="$LDFLAGS -L${ff_fftw_dir}/lib"           CPPFLAGS="$CPPFLAGS -I${ff_fftw_dir}/include"       	  fi  AC_CHECK_LIB(fftw3,fftw_execute,                ff_fftw_ok=yes)  AC_CHECK_HEADERS(fftw3.h,             ff_fftw_h=yes, ff_fftw_h=no)   if test "$ff_fftw_ok" = yes  -a "$ff_fftw_h" = yes     then      AC_DEFINE(HAVE_FFTW,1, fftw is compute fft)   else       LIBS="$ff_libs_old"       LDFLAGS="$ff_ldflags_old"       CPPFLAGS="$ff_cppflags_old"       fifidone# Modif: morice 2008# Looking for the tetgen# --------------------ff_tetgen_ok=noff_tetgen_dir="${curdir}/download"ff_libs_old="$LIBS"ff_ldflags_old="$LDFLAGS"ff_cppflags_old="$CPPFLAGS"#for ff_tetgendir in "" "${curdir}/download";#doif test "$ff_tetgen_ok" = no	then	  if test -n "$ff_tetgen_dir"	  then           LDFLAGS="$LDFLAGS -L${ff_tetgen_dir}/lib"           CPPFLAGS="$CPPFLAGS -I${ff_tetgen_dir}/include"      fi  AC_CHECK_LIB(tet,tetrahedralize,                ff_tetgen_ok=yes)  AC_CHECK_HEADERS(tetgen.h,             ff_tetgen_h=yes, ff_tetgen_h=no)   if test "$ff_tetgen_ok" = yes  -a "$ff_tetgen_h" = yes     then      AC_DEFINE(HAVE_TETGEN,1, tetgen is compute tetrahedralize volume of an enclosed surface)   else       LIBS="$ff_libs_old"       LDFLAGS="$ff_ldflags_old"       CPPFLAGS="$ff_cppflags_old"       fifi#done# Looking for the BLAS# --------------------# User-specified locationff_blas_ok=noAC_ARG_WITH(blas,	[  --with-blas=library	Use a specific version of the Blas],	ff_blas_ok=yes	ff_blas_libs="${withval}")ff_blas_inc=""# Specific BLAS library location for FreeBSDff_freebsd_blas="-lf2c -lf77blas -latlas -lgslcblas"#  zmach is in lapack # Trying  blas library#echo "LIBS = " $LIBSfor iblas in \"-framework vecLib" "-lblas"  "-L/usr/lib/atlas -lblas" \$ff_freebsd_blasdo#   #"-L${curdir}/download/blas -lcblas -lf77blas" \#"-L${curdir}/download/blas/ATLAS/lib/ff++ -lcblas -lf77blas -latlas" \ #"-L${curdir}/download/blas/WinNT_PPRO256 -lcblas -lf77blas -latlas" \#if test "$ff_blas_ok" = no;then        AC_MSG_CHECKING(for daxpy_ in $iblas)        ff_save_libs="$LIBS"        LIBS="$LIBS $iblas"        AC_LINK_IFELSE(                [AC_LANG_CALL(,daxpy_)],                ff_blas_ok=yes		ff_blas_libs="$iblas",)                LIBS="$ff_save_libs"        AC_MSG_RESULT($ff_blas_ok)fidone#cblas_zdotu_sub#echo "LIBS = " $LIBSff_cblas_libs=noif test "$ff_blas_ok" = yes then       AC_MSG_CHECKING(for blas_zdotu_sub in $ff_blas_libs)        ff_save_libs="$LIBS"        LIBS="$LIBS $ff_blas_libs $FLIBS"        AC_LINK_IFELSE(                [AC_LANG_CALL(,cblas_zdotu_sub)],                ff_cblas_libs=yes)        AC_MSG_RESULT($ff_cblas_libs)	LIBS="$ff_save_libs"	fi#echo "LIBS = " $LIBS# If all else fails, download!if test "$ff_blas_ok" = no -a "$enable_download" = yes \   -a "$enable_fortran" != no -a "$enable_c" != nothen	AC_CHECK_PROG(ff_unzip,unzip,yes,no)	AC_MSG_CHECKING(for BLAS version to download)	# Do not update $LIBS, but create an extra LIB variable,	# because this lib does not exist yet, and this could make the	# following tests fail.	# When compiling a generic version, we do not need an	# optimized version of the BLAS.#	if test "$enable_generic" = yes -o "$enable_generic_blas" = yes #   supress the automatic compilation of atlas, to expencive  (FH version 3.0-5)	if true 	then		ff_download_blas=generic		ff_blas_libs="-L${curdir}/download/blas -lcblas -lf77blas"		ff_blas_inc="-I${curdir}/download/blas/CBLAS/src"		AC_SUBST(GENERIC_BLAS,"libf77blas.a libcblas.a")		AC_SUBST(GENERIC_BLAS_BUILT_SOURCES,'BLAS CBLAS  $(F77BLAS_SOURCES) $(CBLAS_SOURCES)')	else		# There are precompiled versions for Windows. We cannot		# distinguish the different versions easily so we just		# download the most generic one. A more specific version can		# always be downloaded by hand.		# BUG: at the moment, some necessary symbols are missing from		# the precompiled version (e.g. _dgemm_).###	if test "$ff_win32" = yes -a "$enable_generic" = yes -a "$ff_unzip" = yes		if false		then			ff_download_blas=atlas-binary			ff_blas_libs="-L${curdir}/download/blas/WinNT_PPRO256 -lcblas -llapack -lf77blas -latlas"			ff_blas_inc="-I${curdir}/download/blas/WinNT_PPRO256"			ff_lapack_ok=ok		else			ff_download_blas=atlas-source			ff_blas_libs="-L${curdir}/download/blas/ATLAS/lib/ff++ -lcblas -llapack -lf77blas -latlas"			ff_blas_inc="-I${curdir}/download/blas/ATLAS/include"			ff_lapack_ok=ok		fi	fi	AC_MSG_RESULT($ff_download_blas)	AC_SUBST(DOWNLOAD_BLAS,$ff_download_blas)	ff_blas_ok=yes        ff_cblas_h=yes	ff_cblas_libs=yesfiAC_MSG_RESULT($ff_blas_inc)AC_SUBST(BLASLIBS,$ff_blas_libs)AC_SUBST(BLASINC,$ff_blas_inc)#looking for cblas.h  FH if test "$ff_blas_ok" = yes -a "$ff_cblas_libs" = yes ;then  AC_CHECK_HEADERS(cblas.h,       ff_cblas_h=yes,       ff_cblas_h=no)  AC_CHECK_HEADERS(vecLib/cblas.h,       ff_cblas_h=yes       ff_cblas_h=no)  AC_CHECK_HEADERS(atlas/cblas.h,       ff_cblas_h=yes       ff_cblas_h=no)fi# Looking for ARPACK# ------------------# We need the following g77 libraries to connect to the Fortran 77# Arpack.if test "$ff_blas_ok" = yes;then  ff_g2c_lib="$FLIBS"       if test  -n "$ff_g2c_lib"       then           LIBS="$LIBS $ff_g2c_lib"              else 	  ff_g2c_ok=no	  AC_CHECK_LIB(g2c,G77_second_0,		LIBS="$LIBS -lg2c"		ff_g2c_lib="-lg2c"		ff_g2c_ok=yes)	  if test "$ff_g2c_ok" = no;	     then	        AC_MSG_CHECKING(for G77_second_0 in /sw/lib/libg2c.a)		ff_save_libs="$LIBS"		LIBS="$LIBS -L/sw/lib -lg2c"		AC_LINK_IFELSE(			[AC_LANG_CALL(,G77_second_0)],			ff_g2c_lib="-L/sw/lib -lg2c"			ff_g2c_ok=yes,			LIBS="$ff_save_libs")		AC_MSG_RESULT($ff_g2c_ok)	  fi	fifi# Copy the result of g2c investigations into a separate variable# because BLAS compilation will need it.AC_SUBST(G2CLIB,$ff_g2c_lib)#looking of  lapack if no compile the arpack lapack # warning $$ because the make eat one ff_lapack_ok=no;ff_lapack_lib=AC_MSG_CHECKING(for lapack in LIBS  )  if test "$ff_blas_ok" = yes ; then           AC_LINK_IFELSE( [AC_LANG_CALL(,dgeqr2_)], ff_lapack_ok=yes)  fiAC_MSG_RESULT($ff_lapack_ok)if test "$ff_lapack_ok" = no; thenAC_ARG_WITH(lapack,	[  --with-lapack=library	Use a specific version of the Lapack],	ff_lapack_ok=yes	ff_lapack_libs="${withval}"	LIBS="$ff_lapack_libs $LIBS")fiff_lapackdir='$$(LAPACKdir)'if  test "$ff_lapack_ok" = yes ; then  # no compilation of lapack in  arpack   ff_lapackdir=else  ff_lapack_libs=-llapackfi# Arpack itselfff_arpack_ok=no   ff_save_libs="$LIBS"ff_arpack_libs=if test "$ff_blas_ok" = yes;then	# User-specified location	AC_ARG_WITH(arpack,		[  --with-arpack=library	Use a specific version of Arpack],		ff_arpack_ok=yes		ff_arpack_libs="${withval}")	# Default locations	if test "$ff_arpack_ok" = no;	then		AC_CHECK_LIB(arpack,dsaupd_,			ff_arpack_libs="-larpack -llapack"			ff_arpack_ok=yes,,			-llapack)	fi   # Trying to "locate" Arpack   if test "$ff_arpack_ok" = no -a "$enable_download" != yes ;   then        AC_MSG_CHECKING(for libarpack with locate)        ff_lib_arpack=`locate libarpack|grep  'libarpack.*.a$'|head -1`	LIBS="$ff_lib_arpack $LIBS"        AC_LINK_IFELSE(                [AC_LANG_CALL(,dsaupd_)],                ff_arpack_ok=yes                ff_arpack_libs="$ff_lib_arpack")        AC_MSG_RESULT($ff_arpack_ok)    fi	# If all else fails, download!	if test "$ff_arpack_ok" = no -a "$enable_download" = yes \	   -a "$enable_fortran" != no	then                ff_arpack_download=yes		AC_MSG_NOTICE(using downloaded Arpack)		AC_SUBST(DOWNLOAD_ARPACK,arpack)		AC_SUBST(FF_LAPACKdir,$ff_lapackdir)		AC_SUBST(ARPACKLIB,${curdir}/download/lib/libarpack.a)		AC_SUBST(LAPACKLIB,${curdir}/download/lib/liblapack.a)		# Do not update $LIBS, but create an extra LIB variable,		# because this lib does not exist yet, and this could make the		# following tests fail.                ff_arpack_libs="-L${curdir}/download/lib -larpack  $ff_lapack_lib"		ff_arpack_ok=yes	fifiif test  "$ff_arpack_ok" != yes 

⌨️ 快捷键说明

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