1
# Configuration script using Automake + Autoconf for FreeFem++
2
# ------------------------------------------------------------
4
# Antoine Le Hyaric - LJLL Paris 6 - lehyaric@ann.jussieu.fr - 13/5/04
5
# $Id: configure.ac,v 1.338 2010/05/10 21:35:07 hecht Exp $
7
# Version numbering: x.xx-pp where "pp" is the package version (when
8
# the same FreeFem++ version is packaged several times). For
9
# coherency, this should have the same value as the top-most package
10
# number in debian/changelog.
13
AC_INIT(FreeFem++,3.25,hecht@ann.jussieu.fr,freefem++)
20
AC_PREREQ(2.50) dnl for AC_LANG_CASE
21
dnl AC_CONFIG_SRCDIR(src/FreeFem++-CoCoa)
22
# Automake 1.11 is too old for check ...
23
AM_INIT_AUTOMAKE(1.13 dist-zip)
25
AC_CONFIG_HEADERS(config.h)
27
dnl AM_COLOR_TESTS=always
30
# FFCS - parallel make options (see [[file:../../configure/ac::FFCS_MAKEFLAGS]])
32
AC_SUBST(FFCS_MAKEFLAGS,$FFCS_MAKEFLAGS)
34
ff_where_lib_conf=examples++-load/WHERE_LIBRARY-config
35
dnl search of associad software
36
m4_define([AC_FF_ADDWHERELIB],
37
[ if test -z "$ff_where_lib_conf_$1" ; then
38
echo "$1 LD $2" >>$ff_where_lib_conf
39
test -n "$3" && echo "$1 INCLUDE $3 " >>$ff_where_lib_conf
40
ff_where_lib_conf_$1=1
41
AC_MSG_NOTICE([ ++ add $1 : $2 $3 in $ff_where_lib_conf "])
43
AC_MSG_NOTICE([ -- do not add $1 : $2 $3 in $ff_where_lib_conf "])
46
m4_define([AC_FF_WHERELIB],
47
[ if test -z "$ff_where_lib_conf_$1" ; then
48
AC_MSG_CHECKING(check $1)
51
AC_LINK_IFELSE([AC_LANG_PROGRAM([m4_if($3,,,[#include <$3>])],[])], [ff_WHERE=yes],[ff_WHERE=no])
52
if test "$ff_WHERE" = "yes" ; then
53
echo "$1 LD $2" >>$ff_where_lib_conf
54
ff_WHERE_INC=`AS_DIRNAME(["$3"])`
55
if test -n "$ff_WHERE_INC" -a "$ff_WHERE_INC" != '.' ; then
56
echo "$1 INCLUDE -I$ff_WHERE_INC" >>$ff_where_lib_conf
59
AC_MSG_RESULT($ff_WHERE)
61
ff_where_lib_conf_$1=1
64
])dnl end m4_define AC_FF_WHERELIB
68
echo "# Build with freefem++ with ./configure " `date` >$ff_where_lib_conf
69
# To allow anonymous CVS version to contain a "./configure" and
82
AC_CHECK_PROG(ff_m4,m4,yes,no)
83
AC_CHECK_PROG(ff_bison,bison,yes,no)
84
dnl AC_CHECK_PROG(ff_cmake,cmake,yes,no)
85
AC_CHECK_PROG(ff_patch,patch,yes,no)
86
case "$ff_m4 $ff_bison $ff_patch " in
88
AC_MSG_NOTICE([ to install missing package under debian or ubuntu, try: sudo apt-get install m4 bison patch cmake ])
89
AC_MSG_ERROR([ Sorry missing m4,bison,patch command !]);;
93
if test -z "$CXX"; then
94
AC_MSG_NOTICE( [ fatal error : c++ compiler ! ] );
95
AC_MSG_ERROR([ Sorry no c++ compiler !])
98
AC_COMPUTE_INT(ff_size_long,[sizeof(long)])
99
AC_COMPUTE_INT(ff_size_int,[sizeof(int)])
100
AC_COMPUTE_INT(ff_size_ptr,[sizeof(int*)])
102
AC_SUBST(SIZEOF_LONG,$ff_size_long)
103
AC_SUBST(SIZEOF_INT,$ff_size_int)
104
AC_SUBST(SIZEOF_PTR,$ff_size_ptr)
105
if test "$ff_size_ptr" -eq 4 ;then
106
AC_SUBST(SIZEOF_PTRINBIT,32)
107
elif test "$ff_size_ptr" -eq 8 ;then
108
AC_SUBST(SIZEOF_PTRINBIT,64)
110
AC_MSG_NOTICE( [ fatal error : sizeof pointer $ff_size_ptr ! or no c++ compiler: $CXX] );
111
AC_MSG_ERROR([ Sorry sizeof c++ pointer $ff_size_ptr are not 4 or 8 ])
114
# FFCS - build the code for FreeFem++-cs
115
AC_ARG_ENABLE(fortran,[ --enable-ffcs build FreeFem++ for use by FreeFem++-cs])
116
if test "$enable_ffcs" = yes
118
AC_DEFINE_UNQUOTED(ENABLE_FFCS,$enable_ffcs,[build FreeFem++ for use by FreeFem++-cs])
122
AC_SUBST(ENABLE_FFCS,"$enable_ffcs")
123
AM_CONDITIONAL([ENABLE_FFCS],[test $enable_ffcs = yes])
125
# dur dur car sous MacOsX le fortran n'est pas standard.
130
AC_ARG_ENABLE(fortran,[ --disable-fortran No Fortran compiler available ( ARPACK need it)])
132
if test "$enable_fortran" != no
135
# ALH-FFCS-2/3/10: add gfortran-mp-4.4 for MacPorts on MacOS 10.6
136
AC_PROG_FC(gfortran f90 xlf90 g95 gfortran-mp-4.4)
137
AC_PROG_F77(gfortran f90 xlf xlf90 g95 f77 fort77 "$FC" gfortran-mp-4.4)
143
AC_F77_LIBRARY_LDFLAGS
145
# correct pb of double def under macos
148
if test -z "$FLIBS" ; then
149
# FLIBS=`fort77 -v a.out 2>&1|awk '/a.out/ && /fort77/ { print $(NF-2),$(NF-1)}'`
151
FLIBS=`fort77 -v a.out 2>&1|awk '/a.out/ && /fort77/ { print "echo",$(NF-2),$(NF-1)}'|sh`
153
AC_MSG_WARN([ fort77 FLIBS : $FLIBS ])
159
# save last directory of the list
161
d=`expr $i : '-L\(.*\)'`;
163
if test -e "$d/libg2c.so" ; then
164
ff_flibs="$d/libg2c.so"
165
elif test -e "$d/libg2c.dylib" ; then
166
ff_flibs="$d/libg2c.dylib"
167
elif test -e "$d/libg2c.a" ; then
168
ff_flibs="$d/libg2c.a"
169
elif test -e $d/libg2c.so -o -e $d/libg2c.a ; then
174
if test -e "$ff_flibs" ;then
177
FLIBS="$ff_flibs -lg2c"
179
AC_MSG_WARN([ get dir of -lg2c FLIBS : $FLIBS ])
181
# add FH sep 2006 / modif 2009
186
d=`expr $i : '-L\(.*\)'`;
187
if test -e "$d/libgfortran.so" ; then
188
ff_flibs="$d/libgfortran.so"
189
elif test -e "$d/libgfortran.dylib" ; then
190
ff_flibs="$d/libgfortran.dylib"
191
elif test -e "$d/libgfortran.a" ; then
192
ff_flibs="$d/libgfortran.a"
193
elif test -e $d/libgfortran.so -o -e $d/libgfortran.a -o -e $d/libgfortran.dylib ; then
198
if test -e "$ff_flibs" ;then
201
FLIBS="$ff_flibs -lgfortran"
203
AC_MSG_WARN([ get dir of -lgfortran FLIBS : $FLIBS ])
206
AC_ARG_WITH(flib,[ --with-flib= the fortran library ])
207
# correct FH sep 2006 -o -> -a
208
if test "$with_flib" != no -a -n "$with_flib"
210
ff_g2c_lib="$with_flib"
213
# add FH oct 2007 for download f2c
214
if test -z "$F77" ; then
215
ff_f77=`pwd`/download/bin/fort77
216
ff_flibs=`pwd`/download/lib/libf2c.a
217
if test -x $ff_f77 -a -f $ff_flibs ; then
218
AC_MSG_WARN([ no fortran, but find download f2c/fort]);
222
AC_MSG_NOTICE( [ fatal error : no fortran ] );
223
AC_MSG_NOTICE( [add --disable-fortran ] );
224
AC_MSG_NOTICE( [or try to compile f2c in directory download/f2c ] );
225
AC_MSG_NOTICE( [ just do: make install ] );
226
AC_MSG_ERROR([ Fatal error No Fortran compiler . ],1);
229
# check if the FLIBS is correct
231
LIBS="$ff_libs $FLIBS"
232
AC_TRY_LINK_FUNC(exit,ff_err=,ff_err=ok);
233
if test "$ff_err" = "ok" ; then AC_MSG_ERROR([ Fatal FLIBS: $FLIBS is incorrect. ],1); fi
235
echo "F77 LD $ff_libs" >config_LIB_INFO
237
AC_MSG_CHECKING([ Size of fortran 77 integer ])
242
AC_LANG_PUSH([Fortran 77])
243
AC_RUN_IFELSE([AC_LANG_SOURCE([[
248
open(7,file="conftest.out")
256
]])] ,ff_f77intsize=`cat conftest.out`,ff_f77intsize=4,ff_f77intsize=4)
258
AC_LANG_POP([Fortran 77])
259
AC_MSG_RESULT($ff_f77intsize)
263
case $ac_cv_f77_mangling in
264
# "lower case, no underscore, no extra underscore")
265
# "lower case, no underscore, extra underscore")
267
"lower case, underscore, no extra underscore") ff_cfagsf77="-DAdd_";;
268
"lower case, underscore, extra underscore") ff_cfagsf77="-DAdd__ -Df77IsF2C";;
269
"upper case, no underscore, no extra underscore") ff_cfagsf77="-DUPPER";;
270
"upper case, no underscore, extra underscore") ff_cfagsf77="-DUPPER -DAdd__";;
271
"upper case, underscore, no extra underscore") ff_cfagsf77="-DUPPER -DAdd_";;
272
"upper case, underscore, extra underscore") ff_cfagsf77="-DUPPER -DAdd__";;
275
AC_SUBST(CFLAGSF77,$ff_cfagsf77)
276
if test $ff_f77intsize -ne 4
278
AC_MSG_ERROR([ Fatal Error: Your fortran 77 compiler have by not 4 bytes integer ( $ff_f77intsize bytes) ],1);
280
test -f /mingw/bin/libpthread-2.dll && ff_pthread_dll=/mingw/bin/libpthread-2.dll ; \
281
AC_FF_ADDWHERELIB(f77,$FLIBS,$ff_cfagsf77 $ff_pthread_dll)
282
AC_FF_ADDWHERELIB(fc,$FLIBS,$ff_cfagsf77 $ff_pthread_dll)
284
dnl [echo f77 LD $FLIBS >>$ff_where_lib_conf]
285
dnl [echo f77 INCLUDE $ff_cfagsf77 >>$ff_where_lib_conf]
287
dnl [echo fc LD $FLIBS >>$ff_where_lib_conf]
288
dnl [echo fc INCLUDE $ff_cfagsf77 >>$ff_where_lib_conf]
290
# AC_DEFINE_UNQUOTED(FF_F77_INTEGER_SIZE,$ff_f77intsize,[ size of F77 integer ])
292
# fin test FORTRAN ..........
293
# -----------------------------
294
AC_ARG_ENABLE(c,[ --disable-c No C compiler available (C BLAS need it)])
295
if test "$enable_c" != no
301
# We need to define this otherwise ./configure crashes with
302
# the message "configure: error: conditional "am__fastdepCC"
303
# was never defined".
306
am__fastdepCC_FALSE='#'
314
# Some useful libraries
316
AC_CHECK_LIB(pthread,pthread_create,ff_pthread="-lpthread",ff_pthread="")
318
if test -n "$ff_pthread" ; then
319
AC_FF_ADDWHERELIB(pthread,$ff_pthread,)
322
# Necessary absolute pathname for local directory when some libraries
323
# are used from several different locations (for instance locally in
324
# configure.ac and in a subdir).
330
echo $ac_configure_args > configure.param
331
# by default the suffix of the .so lib file is .so
332
# it is .dll under windows
333
# it is .dylib under macos X
334
ff_suffix_dylib="so";
335
# Checking wether we can produce a MacIntosh-specific version
336
# -----------------------------------------------------------
338
AC_MSG_CHECKING(wether we are on a MacIntosh)
340
if test `uname` = Darwin;
342
ff_HOSTARCH_pastix=i686_mac
343
ff_suffix_dylib="dylib"
345
AC_DEFINE_UNQUOTED(FF_PREFIX_DIR_APPLE,"/Applications/FreeFem++.app/Contents/",FreeFem prefix dir)
347
AC_MSG_RESULT($ff_mac)
349
AC_MSG_CHECKING(wether we are on SunOS)
351
if test `uname -s` = SunOS;
355
AC_MSG_RESULT($ff_sunos)
357
# Checking wether we can produce a Microsoft Windows-specific version
358
# -------------------------------------------------------------------
360
# Sometimes (under cygwin for instance) the default version of FLTK
361
# does not fit our purpose
363
AC_ARG_ENABLE(default-fltk,
364
[ --disable-default-fltk Does not use default FLTK])
366
AC_ARG_ENABLE(cygwindll,
367
[ --enable-cygwindll Forces the use of the Cygwin DLL (not recommended)])
369
# Default FLTK version under Cygwin does not use threads. So we cannot
372
if test "$enable_cygwindll" = yes
374
enable_default_fltk=no
377
AC_MSG_CHECKING(wether we are on Microsoft Windows)
379
# flag to build window 32 version ff_mingw = yes
384
# FFCS - 17/1/12 - -mno-cygwin is not recognised by the latest version of mingw32
385
if test $enable_ffcs = no
387
ff_nocygwin=-mno-cygwin
390
AC_SUBST(GCCNOCYGWIN,$ff_nocygwin);;
392
enable_cygwindll=no;;
397
ff_suffix_dylib="dll";
400
# FFCS - 8/3/12 - remove -D_MSC_VER under MinGW64 because it forces system calls to be compiled into any object
401
# (which creates thousands of duplicate definitions for sytem calls like time()).
403
if test $enable_ffcs = yes
405
AC_SUBST(FFMETIS_CFLAGS,"-D__VC__")
407
AC_SUBST(FFMETIS_CFLAGS,"-D__VC__ -D_MSC_VER")
410
# We need Mingw to avoid Cygwin's extra DLLs
411
if test "$enable_cygwindll" != yes
413
# CHECK_COMPILE_FLAG(C++,-mwindows,CXXFLAGS)
416
# FFCS: on Windows, FF crashes when compiling GL/glut.h and the option "--disable-opengl" is not
417
# operational because ff_glut_ok is forced to yes here.
418
if test $enable_ffcs = yes
426
ff_pthread="-mthreads"
428
# FFCS does not use the Cygwin MinGW compilers any more
429
if test $enable_ffcs = no
431
CXXFLAGS="$CXXFLAGS $ff_nocygwin -I/usr/include/mingw"
432
FFLAGS="$FFLAGS $ff_nocygwin"
433
CFLAGS="$CFLAGS $ff_nocygwin -I/usr/include/mingw"
434
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int a;])],[],
436
AC_MSG_NOTICE([Sorry $ff_nocygwin optio is wrong try whitout , but try with gcc-3.3])
438
CXXFLAGS="$CXXFLAGS $ff_nocygwin -I/usr/include/mingw"
439
FFLAGS="$FFLAGS $ff_nocygwin"
440
CFLAGS="$CFLAGS $ff_nocygwin -I/usr/include/mingw"
441
CNOFLAGS="$CNOFLAGS $ff_nocygwin -I/usr/include/mingw"
444
LIBS="$LIBS $ff_nocygwin -mthreads -lws2_32 -lcomdlg32"
445
LIBSNOCONSOLE="-mwindows"
447
# FFCS uses a specific compiler, so we specify its libraries explicitely
448
if test $enable_ffcs = no
450
test -z "$MPIRUN" && MPIRUN=`which mpiexe.exe`
451
if test "$enable_fortran" != no -o "$with_flib" != no ; then
453
*gfortran) FLIBS="$ff_nocygwin -lgfortran";;
454
*g77) FLIBS="$ff_nocygwin -lg2c";;
455
*) AC_MSG_ERROR([ Sorry no known FLIBS with this $F77 !]) ;;
461
# check abort a existing function just to find in glut32.dll exist in the path
462
# because glutInit is not the real symbol on win32 dur dur FH !!!!!!!!!
463
AC_CHECK_LIB(glut32,abort,ff_glut="-l$ff_glutname -mthreads -lglu32 -lopengl32",ff_glut="")
464
if test -z "$ff_glut" ; then
465
ff_glutname="freeglut"
466
AC_CHECK_LIB(freeglut,abort,ff_glut="-l$ff_glutname -mthreads -lglu32 -lopengl32",ff_glut_ok=no)
468
# Resources for FreeFem++-cs in Microsoft Windows format
469
AC_SUBST(FFGLUTNAME,$ff_glutname)
470
AC_SUBST(WINDRESOBJ,windres.o)
471
AC_SUBST(LIBSNOCONSOLE,$LIBSNOCONSOLE)
472
AC_SUBST(WIN32DLLTARGET,win32-dll-target)
473
AC_DEFINE(PURE_WIN32,1,A pure windows applications no cygwin dll)
481
AC_MSG_RESULT($ff_win32)
483
if test "$ff_win32" = no
488
# FreeFem++-specific version information
489
# --------------------------------------
491
# Version numbering, converted to a floating point value
492
ff_numver="`echo $VERSION|sed 's/-\(.*\)/+\1.0*0.000001/'`"
493
AC_DEFINE_UNQUOTED(VersionFreeFempp,$ff_numver,FreeFem++ version as a float)
495
# Since src/fflib/strversionnumber.cpp is recreated at each build, this
496
# date is only useful for config-version.h
498
test "$prefix" = NONE && prefix="$ac_default_prefix"
499
ff_prefix_dir="${prefix}/lib/ff++/$VERSION"
500
AC_MSG_CHECKING(prefix dir freefem++ )
501
AC_MSG_RESULT($ff_prefix_dir)
504
AC_DEFINE_UNQUOTED(VersionFreeFemDate,"$FF_DATE",FreeFem++ build date)
505
AC_DEFINE_UNQUOTED(FF_PREFIX_DIR,"${ff_prefix_dir}",FreeFem prefix dir)
506
AC_SUBST(ff_prefix_dir,$ff_prefix_dir)
508
# Separate configuration header file for version information, included
511
cat << EOF > config-version.h
512
/* FreeFem++ version information for MacOS 9 configuration */
513
/* File generated by configure.ac */
515
/* Define to the full name and version of this package. */
516
#define PACKAGE_STRING "$PACKAGE_STRING"
518
/* Define to the one symbol short name of this package. */
519
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
521
/* Define to the version of this package. */
522
#define PACKAGE_VERSION "$PACKAGE_VERSION"
524
/* Version number of package */
525
#define VERSION "$VERSION"
527
/* FreeFem++ build date */
528
#define VersionFreeFemDate "$FF_DATE"
530
/* FreeFem++ version as a float */
531
#define VersionFreeFempp ($ff_numver)
534
# Checking wether to produce a debug version
535
# ------------------------------------------
537
# Generic or hardware-dependant optimization
538
m4_include(acmacros.m4)
539
m4_include(acoptim.m4)
542
# ------------------------------
543
# compilation flags of FreeFem++
544
# ------------------------------
545
# -DDRAWING bamg active some drawing facility in bamg (inquire mesh)
546
# -DBAMG_LONG_LONG active the use of long long in bamg
547
# -DDEBUG active the checking in bamg
548
# -DNCHECKPTR remove check pointer facility
549
# -DCHECK_KN active subscripting of some array
550
# -DWITHCHECK of the dynamic type ckecking of the langague (very slow)
551
# -DEIGENVALUE to compile the eigen value part
552
# ------------------------------------------------
554
# FreeFrem++-specific optimizations -fpascal-strings
555
if test "$enable_debug" = yes;
557
CXXFLAGS="$CXXFLAGS -DBAMG_LONG_LONG -DCHECK_KN"
558
if test "$ff_mac" = yes;
560
CXXFLAGS="$CXXFLAGS -fno-inline -fexceptions"
563
CXXFLAGS="$CXXFLAGS -DBAMG_LONG_LONG -DNCHECKPTR"
564
if test "$ff_mac" = yes;
566
CXXFLAGS="$CXXFLAGS "
570
#whether or not to add a suffix to the package name
571
#--------------------------------------------------
573
AC_ARG_WITH(suffix,[ --with-suffix=[G3/G4/G4,P4,..] or --without-suffix (default no suffix to package name)])
575
AC_MSG_CHECKING(suffix to add to package name)
577
if test "$with_suffix" = yes -o "$with_suffix" = no -o "$with_suffix" = ""
581
ff_suffix="-$with_suffix"
582
AC_MSG_RESULT($ff_suffix)
584
AC_SUBST(ADD_PACKAGE_NAME,$ff_suffix)
589
# Checking that OpenGL is accessible
590
# ----------------------------------
596
AC_ARG_WITH(flib,[ --with-flib= the fortran library ])
597
AC_ARG_ENABLE([opengl],AS_HELP_STRING([--enable-opengl],
598
[Enable/disable support for OpenGL]))
600
# echo " .... LIBS = $LIBS .... "
601
if test x$enable_opengl != xno; then
602
# GL libraries seem to depend on some dlopen capabilities
603
if test "$enable_static" != yes -a "$ff_glut_ok" != yes
605
# If we cannot find gl.h, no OpenGL version can be produced
606
AC_CHECK_HEADERS(OpenGL/gl.h,
613
if test "$ff_gl_ok" = no
615
AC_CHECK_HEADERS(GL/gl.h,
621
AC_CHECK_HEADERS(GLUT/glut.h,
625
if test "$ff_glut_ok" = no
627
AC_CHECK_HEADERS(GL/glut.h,
633
if test "$ff_glut_ok" = yes
636
"-framework GLUT -framework OpenGL -framework Cocoa" \
641
LIBS="$LIBS $ff_glut"
642
AC_TRY_LINK_FUNC(glutInit,
654
AC_SUBST(LIBSPTHREAD,$ff_pthread)
656
if test "$ff_glut_ok" = yes
658
AC_SUBST(LIBSGLUT,$ff_glut)
659
if test -n "$ff_pthread" ; then
660
ff_ffglutprog="ffglut${EXEEXT}"
661
AC_DEFINE_UNQUOTED(PROG_FFGLUT,"$ff_ffglutprog", the ffglut application for the new graphics )
663
ff_meditprog="ffmedit${EXEEXT}"
665
# echo " .... LIBS = $LIBS .... "
669
AC_ARG_WITH(suffix,[ --with-suffix=[G3/G4/G4,P4,..] or --without-suffix (default no suffix package name)])
670
if test "$with_suffix" = yes
673
elif test "$with_suffix" = no -o -z "$with_suffix"
677
with_suffix="-$with_suffix"
679
AC_MSG_CHECKING(add suffix $with_suffix )
680
AC_SUBST(ADD_PACKAGE_NAME,$with_suffix)
684
# Checking wether we can produce a parallel version
685
# -------------------------------------------------
687
if test $enable_ffcs = no
692
# FFCS - use the same MPI configuration choices as FFCS
694
AC_SUBST(MPICXX,$MPICXX)
695
AC_SUBST(MPICC,$MPICC)
696
AC_SUBST(MPIF77,$MPIF77)
697
AC_SUBST(MPIFC,$MPIFC)
698
AC_SUBST(MPIPROG,"FreeFem++-mpi${EXEEXT}")
699
AC_SUBST(MPI_INCLUDE,"-I $MPI_INC_DIR")
700
AC_SUBST(MPI_INC_DIR,$MPI_INC_DIR)
701
AC_SUBST(MPI_LIB_DIRS,"")
702
AC_SUBST(MPI_LIB,$MPI_LIB)
703
AC_SUBST(MPI_LIBC,"")
704
AC_SUBST(MPI_LIBFC,"")
706
# Extra MPI-dependant configuration options that are set by FF during MPI configuration. FFCS - 25/2/13 - Fred
707
# noticed that if PASTIX_HOSTARCH stays blank, pastix compilation breaks. At least i686_pc_linux and i686_mac are
708
# accepted by pastix. So we just use $ac_build_alias which is much more reliable than $ff_HOSTARCH_pastix.
710
AC_SUBST(PASTIX_HOSTARCH,$ac_build_alias)
712
# these values should not be empty otherwise examples++-load/ff-get-dep will think that they are not defined
713
AC_FF_ADDWHERELIB(mpi,-DDUMMY,-I$MPI_INC_DIR)
715
# mpifc and mpif77 libraries should always be specified because FF never calls the Fortran MPI compiler. It always
716
# uses mpicxx in [[file:examples++-load/ff-c++]]. The resulting Fortran libraries (eg Mumps) would compile even
717
# without the proper Fortran libs, but they would not load properly.
719
# under Win32, libmpi_f77.a is not the right name and ff/mingw/mpicxx adds the right libraries by itself
721
if test $ff_win32 != yes
723
AC_FF_ADDWHERELIB(mpifc,-lmpi_f77,)
724
AC_FF_ADDWHERELIB(mpif77,-lmpi_f77,)
726
AC_FF_ADDWHERELIB(mpifc,-DDUMMY,)
727
AC_FF_ADDWHERELIB(mpif77,-DDUMMY,)
730
# FFCS - MPI_DOUBLE_COMPLEX kept from original FF configure script
731
AC_MSG_CHECKING( MPI_DOUBLE_COMPLEX)
735
MPI_Datatype xxxx=MPI_DOUBLE_COMPLEX;
737
ff_mpi_double_complex=yes,
738
ff_mpi_double_complex=no)
739
AC_MSG_RESULT($ff_mpi_double_complex)
740
if test "$ff_mpi_double_complex" = yes ; then
741
AC_DEFINE(HAVE_MPI_DOUBLE_COMPLEX,1, mpi_double_complex)
745
# FFCS needs to change some of the FF makefiles to compile without MPI on MacOS
746
AM_CONDITIONAL([FFCS_MPIOK],[test $ff_mpi = yes])
748
# Looking for useful configuration utilities
749
# ------------------------------------------
751
#getting utility software archives through the internet
752
AC_ARG_ENABLE(generic_blas,[ --enable-generic_blas Downloadc generic blas (implie --enable-download)])
754
AC_ARG_ENABLE(download,[ --enable-download Download missing libraries (BLAS,ARPACK,UMFPACK,FLTK)])
756
#replacing wget with another command
757
ff_wget_command="wget --no-check-certificate"
761
[ --with-wget=command Replace "wget" with another command. Implies --enable-download],
764
ff_wget_command="${withval}")
768
[ --with-mkl= the MKL LIBPATH : (ie. /opt/intel/mkl/RR.r.y.xxx/lib/<arch>)],
769
ff_mkl_libpath="${withval}")
772
if test "$enable_generic_blas" = yes
776
# echo " ----------- $enable_download --"
777
# if enabling downloads find wget or curl to do download
778
# ------------------------------------------------------
780
if test "$ff_wget" = no
783
AC_CHECK_PROG(ff_wget,wget --no-check-certificate,yes,no)
785
if test "$ff_wget" = no
787
ff_wget_command="curl --fail -O "
789
AC_CHECK_PROG(ff_curl,curl -O,yes,no)
793
# for automatique compilation of
795
if test "$ff_wget" != yes -a "$enable_download" = "yes" ; then
797
AC_MSG_ERROR([ enable-download and no wget or curl. ],1);
799
if test "$enable_download" = "yes" ; then
800
DOWNLOADCOMPILE=compile-pkg
805
AC_SUBST(WGET,$ff_wget_command)
806
AC_SUBST(DOWNLOADCOMPILE,$DOWNLOADCOMPILE)
809
# -- looking for cadna
810
# the round-off error propagation
811
# the web site http://www-anp.lip6.fr/cadna/
812
# --------------------
813
AC_ARG_WITH(cadna,[ --with-cadna= cadna library --without-cadna ])
814
if test "$with_cadna" != no -o -n "$with_cadna"
816
ff_cadna="$with_cadna"
819
if test "$with_cadna" != no
822
ff_ldflags_old="$LDFLAGS"
823
ff_cadna_dir="${curdir}/download/cadna"
824
LDFLAGS="$LDFLAGS -L$ff_cadna_dir"
825
AC_CHECK_LIB(cadnafree,arit_zero,
827
AC_CHECK_HEADERS(${ff_cadna_dir}/cadnafree.h,
828
ff_cadna_h=yes, ff_cadna_h=no)
831
LDFLAGS="$ff_ldflags_old"
833
if test "$ff_cadna_ok" = yes -a "$ff_cadna_h" = yes
835
AC_DEFINE(HAVE_CADNA,1, freecadna is use to evalute the round-off error propagation )
836
CPPFLAGS="$CPPFLAGS -I$ff_cadna_dir"
837
LIBS=" -L$ff_cadna_dir -lcadnafree $ff_libs_old"
839
AC_MSG_NOTICE([ without cadna ***** ])
842
AC_MSG_NOTICE([ without cadna ***** ])
845
dnl : Looking for the FFTW3
846
dnl --------------------------
847
AC_CHECK_LIB(fftw3,fftw_execute,ff_fftw_ok=yes)
848
AC_CHECK_HEADERS(fftw3.h,ff_fftw_h=yes, ff_fftw_h=no)
849
if test "$ff_fftw_ok" = yes -a "$ff_fftw_h" = yes
851
AC_FF_ADDWHERELIB(fftw3,-lfftw3,)
852
dnl [echo fftw3 LD -lfftw3 >>$ff_where_lib_conf]
854
dnl ---------------------------
855
dnl Looking for the tetgen
856
dnl --------------------------
857
AC_CHECK_LIB(tet,tetrahedralize,ff_fftet_ok=yes)
858
AC_CHECK_HEADERS(tetgen.h,ff_tet_h=yes, ff_tet_h=no)
859
if test "$ff_tet_ok" = yes -a "$ff_tet_h" = yes
861
AC_FF_ADDWHERELIB(tetgen,-ltet,)
862
dnl [echo tetgen LD -ltet >>$ff_where_lib_conf]
863
AC_DEFINE(HAVE_TETGEN,1, tetgen is compute tetrahedralize volume of an enclosed surface)
865
dnl ---------------------------
868
# Looking for the BLAS
869
# --------------------
872
# User-specified location
873
# add MKL seach dec 2010 FH ....
876
if test "$ff_mkl_libpath" != "not" ; then
878
CHECK_COMPILE_FLAG(C,-mkl,CFLAGS)
879
if test "$ff_CFLAGS" != "$CFLAGS" ; then
880
ff_ff_mkl_flags="-mkl"
885
AC_MSG_CHECKING(for MKL )
887
if test "$ff_mkl_libpath" != "not" -a -z "$ff_mkl_flags" ; then
888
if test "$ff_mkl_libpath" = "yes" ; then
891
for i in $LD_LIBRARY_PATH:$LIBRARY_PATH ; do
893
*/mkl/*) ff_mkl_libpath=$i;;
900
if test "$ff_mkl_libpath" != "no" -a -d "$ff_mkl_libpath" ; then
901
ff_mkl_root=`expr "//$ff_mkl_libpath" : '//\(.*\)/lib/.*'`
902
ff_mkl_arch=`expr "//$ff_mkl_libpath" : '//.*/lib/\(.*\)'`
904
case "$ff_mkl_arch" in
905
*64*) ff_mkl_lp=_lp64
908
*ifort*) ff_mkl_cc=intel;;
913
*/sgi/*) ff_mkl_mpi=_sgimpt;;
914
*/intel/*) ff_mkl_mpi=_intelmpi;;
915
*) ff_mkl_mpi=_openmpi;;
917
# echo ................ ff_mkl_root = $ff_mkl_root .. $ff_mkl_arch
918
if test -f $ff_mkl_root/lib/$ff_mkl_arch/libmkl_rt.a ; then
921
ff_mkl_mlt="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_rt -lmkl_intel_thread -lmkl_core -liomp5 -lpthread"
922
ff_mkl_blas="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_rt -lmkl_sequential -lmkl_core -liomp5 -lpthread"
923
ff_mkl_lapack="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_rt -lmkl_sequential -lmkl_core -liomp5 -lpthread"
925
if test -f $ff_mkl_root/lib/$ff_mkl_arch/libmkl_lapack.a ; then
926
ff_mkl_mlt="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_lapack -lmkl_intel${ff_mkl_lp} -lmkl_intel_thread -lmkl_core -lguide -lm -lpthread"
927
ff_mkl_blas="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_lapack -lmkl_intel${ff_mkl_lp} -lmkl_sequential -lmkl_core -lguide -lm -lpthread"
928
ff_mkl_lapack="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_lapack"
930
ff_mkl_mlt="-Wl,--start-group -L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_intel${ff_mkl_lp} -lmkl_intel_thread -lmkl_core -lmkl_intel_thread -liomp5 -Wl,--end-group -lm -lpthread"
931
ff_mkl_blas="-Wl,--start-group -L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_intel${ff_mkl_lp} -lmkl_sequential -lmkl_core -lmkl_sequential -Wl,--end-group -lm -lpthread"
932
ff_mkl_lapack="$ff_mkl_blas"
935
ff_mkl_scalapack="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_blacs${ff_mkl_mpi}${ff_mkl_lp} -lmkl_scalapack${ff_mkl_lp} "
936
ff_mkl_blacs="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_blacs${ff_mkl_mpi}${ff_mkl_lp} -lmkl_scalapack${ff_mkl_lp}"
939
ff_blas_libs="$ff_mkl_blas"
940
ff_blas_inc="-I$ff_mkl_root/include"
941
dnl scalapack, and blacs don not work with mlk and sgi
942
if test "$ff_mkl_mpi" != "_sgimpt" ; then
943
AC_FF_ADDWHERELIB(scalapack,$ff_mkl_scalapack,$ff_blas_inc)
944
AC_FF_ADDWHERELIB(blacs,$ff_mkl_blacs,$ff_blas_inc)
946
ff_warm=" (We do not use MKL scalapack and blacs with sgi MPI), "
948
AC_FF_ADDWHERELIB(lapack,$ff_mkl_lapack,$ff_blas_inc)
949
AC_FF_ADDWHERELIB(mkl,$ff_mkl_mlt,$ff_blas_inc)
951
dnl echo scalapack LD \'$ff_mkl_scalapack\' >>$ff_where_lib_conf
952
dnl echo blacs LD \'$ff_mkl_blacs\' >>$ff_where_lib_conf
953
dnl echo lapack LD \'$ff_mkl_lapack\' >>$ff_where_lib_conf
954
dnl echo scalapack INCLUDE \'$ff_blas_inc\' >>$ff_where_lib_conf
955
dnl echo blacs INCLUDE \'$ff_blas_inc\' >>$ff_where_lib_conf
956
dnl echo lapack INCLUDE \'$ff_blas_inc\' >>$ff_where_lib_conf
960
# FH - pardiso is there as soon as mkl is
966
AC_MSG_RESULT( [ $ff_warm root: $ff_mkl_root , arch: $ff_mkl_arch , $ff_mkl_lp ... ])
969
[ --with-blas=library Use a specific version of the Blas],
971
ff_blas_libs="${withval}")
975
# Specific BLAS library location for FreeBSD
976
ff_freebsd_blas="-lf2c -lf77blas -latlas -lgslcblas"
978
# Trying blas library
979
# echo "LIBS = $LIBS blas --- $ff_blas_ok"
981
"-framework vecLib" "$ff_mkl_blas" "-lblas" "-L/usr/lib/atlas -lblas" \
985
#"-L${curdir}/download/blas -lcblas -lf77blas" \
986
#"-L${curdir}/download/blas/ATLAS/lib/ff++ -lcblas -lf77blas -latlas" \
987
#"-L${curdir}/download/blas/WinNT_PPRO256 -lcblas -lf77blas -latlas" \
989
if test "$ff_blas_ok" = no;
991
AC_MSG_CHECKING(for daxpy_ in $iblas)
995
[AC_LANG_CALL(,daxpy_)],
997
ff_blas_libs="$iblas",)
999
AC_MSG_RESULT($ff_blas_ok)
1005
#echo "LIBS = " $LIBS
1007
if test "$ff_blas_ok" = yes
1009
AC_MSG_CHECKING(for blas_zdotu_sub in $ff_blas_libs)
1010
ff_save_libs="$LIBS"
1011
LIBS="$LIBS $ff_blas_libs $FLIBS"
1013
[AC_LANG_CALL(,cblas_zdotu_sub)],
1015
AC_MSG_RESULT($ff_cblas_libs)
1016
LIBS="$ff_save_libs"
1018
#echo "LIBS = " $LIBS
1019
# If all else fails, download!
1021
if test "$ff_blas_ok" = no -a "$enable_download" = yes \
1022
-a "$enable_fortran" != no -a "$enable_c" != no
1024
AC_CHECK_PROG(ff_unzip,unzip,yes,no)
1026
AC_MSG_CHECKING(for BLAS version to download)
1028
# Do not update $LIBS, but create an extra LIB variable,
1029
# because this lib does not exist yet, and this could make the
1030
# following tests fail.
1032
# When compiling a generic version, we do not need an
1033
# optimized version of the BLAS.
1035
# if test "$enable_generic" = yes -o "$enable_generic_blas" = yes
1036
# supress the automatic compilation of atlas, to expencive (FH version 3.0-5)
1039
ff_download_blas=generic
1040
ff_blas_libs="-L${curdir}/download/blas -lcblas -lf77blas"
1041
ff_blas_inc="-I${curdir}/download/blas/CBLAS/src"
1043
AC_SUBST(GENERIC_BLAS,"libf77blas.a libcblas.a")
1044
AC_SUBST(GENERIC_BLAS_BUILT_SOURCES,'BLAS CBLAS $(F77BLAS_SOURCES) $(CBLAS_SOURCES)')
1046
# There are precompiled versions for Windows. We cannot
1047
# distinguish the different versions easily so we just
1048
# download the most generic one. A more specific version can
1049
# always be downloaded by hand.
1051
# BUG: at the moment, some necessary symbols are missing from
1052
# the precompiled version (e.g. _dgemm_).
1054
### if test "$ff_win32" = yes -a "$enable_generic" = yes -a "$ff_unzip" = yes
1057
ff_download_blas=atlas-binary
1058
ff_blas_libs="-L${curdir}/download/blas/WinNT_PPRO256 -lcblas -llapack -lf77blas -latlas"
1059
ff_blas_inc="-I${curdir}/download/blas/WinNT_PPRO256"
1063
# ALH - FFCS - 23/12/8 - ATLAS compilation does not work anymore on Linux
1064
AC_MSG_ERROR(No BLAS library found - please install one or install Lapack)
1066
ff_download_blas=atlas-source
1067
ff_blas_libs="-L${curdir}/download/blas/ATLAS/lib/ff++ -lcblas -llapack -lf77blas -latlas"
1068
ff_blas_inc="-I${curdir}/download/blas/ATLAS/include"
1073
AC_MSG_RESULT($ff_download_blas)
1074
AC_SUBST(DOWNLOAD_BLAS,$ff_download_blas)
1079
AC_SUBST(BLASLIBS,$ff_blas_libs)
1080
AC_SUBST(BLASINC,$ff_blas_inc)
1081
#looking for cblas.h FH
1083
if test "$ff_blas_ok" = yes -a "$ff_cblas_libs" = yes ;
1085
AC_CHECK_HEADERS(cblas.h,
1088
AC_CHECK_HEADERS(vecLib/cblas.h,
1091
AC_CHECK_HEADERS(atlas/cblas.h,
1098
# FFCS: do not specify the default BLAS LDADD if a specific one will be built in the download directory
1100
if test "$ff_blas_ok" = yes && test "$ff_download_blas" = ""
1102
AC_FF_ADDWHERELIB(blas,$ff_blas_libs,)
1103
dnl echo blas LD \'$ff_blas_libs\' >>$ff_where_lib_conf
1106
# end of BLAS -------------------
1109
# Looking for ARPACK
1110
# ------------------
1112
# We need the following g77 libraries to connect to the Fortran 77
1115
if test "$ff_blas_ok" = yes;
1118
if test -n "$ff_g2c_lib"
1120
LIBS="$LIBS $ff_g2c_lib"
1123
AC_CHECK_LIB(g2c,G77_second_0,
1128
if test "$ff_g2c_ok" = no;
1130
AC_MSG_CHECKING(for G77_second_0 in /sw/lib/libg2c.a)
1131
ff_save_libs="$LIBS"
1132
LIBS="$LIBS -L/sw/lib -lg2c"
1134
[AC_LANG_CALL(,G77_second_0)],
1135
ff_g2c_lib="-L/sw/lib -lg2c"
1137
LIBS="$ff_save_libs")
1138
AC_MSG_RESULT($ff_g2c_ok)
1143
# Copy the result of g2c investigations into a separate variable
1144
# because BLAS compilation will need it.
1146
AC_SUBST(G2CLIB,$ff_g2c_lib)
1147
#looking of lapack if no compile the arpack lapack
1148
# warning $$ because the make eat one
1151
AC_MSG_CHECKING([for lapack in $LIBS, $ff_blas_libs and -llapack] )
1152
if test "$ff_blas_ok" = yes ; then
1153
AC_LINK_IFELSE( [AC_LANG_CALL(,dgeqr2_)], ff_lapack_ok=yes)
1154
if test "$ff_lapack_ok" = no ; then
1156
LIBS="$ff_save_libs $ff_blas_libs"
1157
AC_LINK_IFELSE( [AC_LANG_CALL(,dgeqr2_)], ff_lapack_ok=yes)
1158
if test "$ff_lapack_ok" = no ; then
1159
LIBS="$ff_save_libs -llapack $ff_blas_libs"
1160
AC_LINK_IFELSE( [AC_LANG_CALL(,dgeqr2_)], [ff_lapack_ok=yes
1161
ff_lapack_lib="-llapack"] )
1163
LIBS="$ff_save_libs"
1167
AC_MSG_RESULT($ff_lapack_ok)
1168
if test "$ff_lapack_ok" != no ; then
1169
AC_SUBST(LAPACKLIBS,$ff_lapack_libs)
1171
if test "$ff_lapack_ok" = no; then
1173
[ --with-lapack=library Use a specific version of the Lapack],
1175
ff_lapack_lib="${withval}"
1176
LIBS="$ff_lapack_lib $LIBS"
1180
ff_lapackdir='$$(LAPACKdir)'
1181
if test "$ff_lapack_ok" = yes ; then
1182
# no compilation of lapack in arpack
1184
if test "$ff_lapack_ok" = yes
1186
AC_FF_ADDWHERELIB(lapack,$ff_lapack_lib,)
1187
dnl echo lapack LD \'$ff_lapack_lib\' >>$ff_where_lib_conf
1191
ff_lapack_lib=-llapack
1196
ff_save_libs="$LIBS"
1198
if test "$ff_blas_ok" = yes;
1201
# User-specified location
1203
[ --with-arpack=library Use a specific version of Arpack],
1205
ff_arpack_libs="${withval}")
1208
if test "$ff_arpack_ok" = no;
1210
AC_CHECK_LIB(arpack,dsaupd_,
1211
ff_arpack_libs="-larpack -llapack"
1216
# Trying to "locate" Arpack
1217
if test "$ff_arpack_ok" = no -a "$enable_download" != yes ;
1219
AC_MSG_CHECKING(for libarpack with locate)
1220
ff_lib_arpack=`locate libarpack|grep 'libarpack.*.a$'|head -1`
1221
LIBS="$ff_lib_arpack $LIBS"
1223
[AC_LANG_CALL(,dsaupd_)],
1225
ff_arpack_libs="$ff_lib_arpack")
1226
AC_MSG_RESULT($ff_arpack_ok)
1228
if test "$ff_arpack_ok" = yes
1230
AC_FF_ADDWHERELIB(arpack,$ff_arpack_libs,)
1231
echo arpack LD "'$ff_arpack_libs'" >>$ff_where_lib_conf
1234
# If all else fails, download!
1235
if test "$ff_arpack_ok" = no -a "$enable_download" = yes \
1236
-a "$enable_fortran" != no
1238
ff_arpack_download=yes
1239
AC_MSG_NOTICE(using downloaded Arpack)
1240
AC_SUBST(DOWNLOAD_ARPACK,arpack)
1241
AC_SUBST(FF_LAPACKdir,$ff_lapackdir)
1242
AC_SUBST(ARPACKLIB,${curdir}/download/lib/libarpack.a)
1243
AC_SUBST(LAPACK_arpack_LIB,${curdir}/download/lib/liblapack.a)
1245
# Do not update $LIBS, but create an extra LIB variable,
1246
# because this lib does not exist yet, and this could make the
1247
# following tests fail.
1248
ff_arpack_libs="-L${curdir}/download/lib -larpack $ff_lapack_lib"
1252
if test "$ff_arpack_ok" != yes
1254
AC_MSG_NOTICE([-- NO ARPACK -- enable_download : $enable_download , wget: $ff_wget ])
1257
# Do not insert ARPACK libs in $LIBS yet, because they may not exist
1258
# yet, and this could make the following tests fail.
1260
LIBS="$ff_save_libs"
1262
if test "$ff_arpack_ok" = yes;
1264
AC_SUBST(ARPACKLIBS,$ff_arpack_libs)
1265
EIGENOBJ='eigenvalue.$(OBJEXT)'
1266
AC_DEFINE(HAVE_LIBARPACK,1,Arpack is used for eigenvalue computation)
1268
# Determines whether to run the eigenvalue tests
1270
# all eigen test fails
1271
AC_SUBST([SKIP_TESTS_EIGEN],[yes])
1273
AC_SUBST([EIGENOBJ])
1275
# Looking for UMFPACK
1276
# -------------------
1280
ff_save_libs="$LIBS"
1281
if test "$ff_blas_ok" = yes;
1283
# User-specified location
1285
[ --with-amd=library Use a specific version of AMD],
1287
ff_umfpack_libs="${withval}")
1289
AC_ARG_WITH(umfpack,
1290
[ --with-umfpack=library Use a specific version of Umfpack],
1292
ff_umfpack_libs="${withval} $ff_umfpack_libs"
1294
# AC_DEFINE(HAVE_LIBUMFPACK,1,
1295
# Umfpack is used for sparse matrices computations))
1297
# Trying default locations
1299
AC_CHECK_HEADERS(umfpack.h umfpack/umfpack.h ufsparse/umfpack.h suitesparse/umfpack.h,
1300
ff_umfpack_header=yes
1301
ff_umfpack_dir=`dirname $ac_header`)
1303
# Somes systems like FreeBSD hide umfpack.h in a directory
1304
# called UMFPACK (all capitals). This breaks the standard
1305
# #define produced by autoconf in config.h.in.
1307
if test "$ff_umfpack_header" != yes;
1309
AC_CHECK_HEADER(UMFPACK/umfpack.h,
1310
ff_umfpack_header=yes
1311
ff_umfpack_dir=UMFPACK
1312
AC_DEFINE(HAVE_BIG_UMFPACK_UMFPACK_H,1,
1313
If umfpack.h is located in UMFPACK subdir))
1315
LIBS="$ff_blas_libs $LIBS"
1316
if test "$ff_amd_ok" = no;
1318
AC_CHECK_LIB(amd,amd_info,
1319
ff_umfpack_libs="$ff_umfpack_libs -lamd"
1323
if test "$ff_umfpack_ok" = no -a "$ff_amd_ok" = yes;
1325
AC_CHECK_LIB(umfpack,umf_i_malloc,
1326
ff_umfpack_libs=" -lumfpack $ff_umfpack_libs"
1327
ff_umfpack_ok=yes,,$ff_umfpack_libs)
1328
if test "$ff_umfpack_ok" != yes -o "$ff_umfpack_header" != yes ; then
1329
AC_MSG_WARN([ Sorry we find UMFPACK lib but not the include umfpack.h file])
1332
if test "$ff_umfpack_header" != yes -a "$ff_umfpack_ok" != no; then
1335
if test "$ff_umfpack_ok" = yes -a "$ff_amd_ok" = yes; then
1336
AC_DEFINE(HAVE_LIBUMFPACK,1, Umfpack is used for sparse matrices computations )
1340
# FFCS - moved UMFPACK configuration settings in wherelib to _after_ configuring the download version, and removed
1341
# -I/usr/include/$ff_umfpack_dir from include options because it breaks the MingW64 compilation process.
1343
#if test $enable_ffcs = yes
1345
if test "$ff_umfpack_ok" = yes
1347
AC_FF_ADDWHERELIB(amd,$ff_umfpack_libs,-I/usr/include/$ff_umfpack_dir)
1348
AC_FF_ADDWHERELIB(umfpack,$ff_umfpack_libs,-I/usr/include/$ff_umfpack_dir)
1350
dnl echo amd LD \'$ff_umfpack_libs\' >>$ff_where_lib_conf
1351
dnl echo amd INCLUDE \'-I/usr/include/$ff_umfpack_dir\' >>$ff_where_lib_conf
1352
dnl echo umfpack LD '$ff_umfpack_libs\' >>$ff_where_lib_conf
1353
dnl echo umfpack INCLUDE \'-I/usr/include/$ff_umfpack_dir\' >>$ff_where_lib_conf
1357
LIBS="$ff_save_libs"
1360
# If all else fails, download!
1361
if test "$ff_umfpack_ok" = no -a "$enable_download" = yes
1363
AC_MSG_NOTICE(using downloaded UMFPACK)
1364
AC_SUBST(DOWNLOAD_UMFPACK,"umfpack cholmod")
1365
ff_umfpack_download=yes
1366
# Do not update $LIBS, but create an extra LIB variable,
1367
# because this lib does not exist yet, and this could make the
1368
# following tests fail.
1370
ff_umfpack_libs="-L${curdir}/download/lib -lumfpack -lcholmod -lcolamd -lamd -lsuitesparseconfig"
1371
AC_DEFINE(HAVE_LIBUMFPACK,1,UMFPACK)
1372
if test "$ff_win32" = yes; then
1373
AC_SUBST(FF_UMFPACK_CONFIG,-DCBLAS)
1378
# FFCS - moved UMFPACK configuration settings in wherelib to _after_ configuring the download version, and removed
1379
# -I/usr/include/$ff_umfpack_dir from include options because it breaks the MingW64 compilation process.
1381
## if test $enable_ffcs = yes && test "$ff_umfpack_ok" = yes
1382
if test "$ff_umfpack_ok" = yes
1384
AC_FF_ADDWHERELIB(amd,$ff_umfpack_libs,)
1385
AC_FF_ADDWHERELIB(umfpack,$ff_umfpack_libs,)
1388
if test "$ff_umfpack_ok" = no
1390
AC_MSG_NOTICE( -- NOT UMFPACK ff_wget = $ff_wget)
1393
AC_SUBST(UMFPACKLIBS,$ff_umfpack_libs)
1395
# Checking for some functions that may not appear everywhere
1396
# ----------------------------------------------------------
1397
AC_CHECK_HEADERS([unistd.h])
1398
# asinh acosh atanh are not in Mingw yet gettimeofday
1401
AC_CHECK_HEADERS(malloc.h,ff_malloc_h=1)
1402
AC_SUBST(FF_MALLOC_H,$ff_malloc_h)
1403
AC_CHECK_FUNCS(asinh acosh atanh getenv jn erfc tgamma gettimeofday)
1404
AC_CHECK_FUNCS(srandomdev)
1406
AC_CHECK_FUNCS(second_,ff_second="",ff_second=second.o)
1407
AC_SUBST(FF_SECOND,"$ff_second")
1409
# If times() and sysconf() are not here, UMFPACK should know
1410
if test "$ff_umfpack_ok" = yes
1412
AC_CHECK_FUNCS(times sysconf,
1413
ff_umfpack_posix_ok=yes,
1414
ff_umfpack_posix_ok=no)
1415
if test "$ff_umfpack_posix_ok" = no
1417
AC_SUBST(FF_UMFPACK_CONFIG,"-DCBLAS -DNPOSIX")
1421
# Enable static linking (no shared libraries)
1422
# -------------------------------------------
1423
AC_CHECK_PROG(ff_libtool,libtool,yes,no)
1424
if test "$ff_mac" = "yes" -a "$ff_libtool" = yes ; then
1426
ff_ARFLAGS="-static -o"
1430
AC_ARG_ENABLE(static,
1431
[ --enable-static Build binaries with no shared library dependencies])
1432
if test "$enable_static" = yes
1434
AC_CHECK_PROG(ff_libtool,libtool,yes,no)
1435
if test "$ff_libtool" = yes
1437
LDFLAGS="$LDFLAGS -all-static"
1438
AC_SUBST(STATICTOOL,libtool)
1440
AC_MSG_ERROR(libtool not found)
1443
# for compiation of arpack use libtool to bluid universal library on MacOs.
1445
AC_SUBST(ARFLAGS,$ff_ARFLAGS)
1446
AC_SUBST(RANLIN,$ff_RANLIB)
1449
# Dynamic loading of compiled functions
1450
# -------------------------------------
1452
# Not if we don't want shared libraries (non FH modif FH juin 2005)
1454
if test "$enable_static" != yes
1457
# Availability of dlopen(). Use AC_COMPILE rather than
1458
# AC_CHECK_HEADERS because the latter has problems seeing it (in
1459
# Cygwin) when it does not compile (in Mingw).
1461
AC_MSG_CHECKING(for dlfcn.h)
1462
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <dlfcn.h>]])],
1465
AC_MSG_RESULT($ff_dynload)
1468
# FFCS - -lm missing for ffmedit link stage on Debian Testing
1471
# Checks that we also have the corresponding library
1472
if test "$ff_dynload" = yes
1474
AC_CHECK_LIB(dl,dlinfo)
1476
# Checks that everythings works ok
1477
AC_MSG_CHECKING(whether dlopen links ok)
1479
[AC_LANG_SOURCE([[#include <dlfcn.h>
1480
int main(int argc,char **argv){
1481
dlopen("",RTLD_LAZY);
1486
AC_MSG_RESULT($ff_dynload)
1489
# the -rdynamic don't exist on macos and sunOS
1490
if test "$ff_dynload" = yes
1492
AC_DEFINE(HAVE_DLFCN_H,1,Dynamic loading - not mandatory)
1493
# Activate dynamic loading tests (see examples++-load/Makefile.am)
1494
AC_SUBST(LOAD_TESTS,../regtests.sh)
1495
AC_SUBST(LOAD_COMPILE,load_compile)
1497
# gcc on MacOS does not produce an error with "-rdynamic" but
1498
# still complains about it.
1499
if test "$ff_mac" = "no" -a "$ff_win32" = "no" -a "$ff_sunos" = "no" ;
1501
CHECK_COMPILE_FLAG(C++,-rdynamic,LDFLAGS)
1502
dnl CHECK_COMPILE_FLAG(C,-rdynamic,CNOFLAGS)
1503
dnl CHECK_COMPILE_FLAG(C,-rdynamic,CFLAGS)
1505
CHECK_COMPILE_FLAG(C++,-fPIC,CXXFLAGS)
1506
CHECK_COMPILE_FLAG(C,-fPIC,CFLAGS)
1507
CHECK_COMPILE_FLAG(C,-fPIC,CNOFLAGS)
1508
if test "$enable_fortran" != no
1510
CHECK_COMPILE_FLAG(Fortran,-fPIC,FFLAGS)
1511
CHECK_COMPILE_FLAG(Fortran,-fPIC,FNOFLAGS)
1512
CHECK_COMPILE_FLAG(Fortran,-fPIC,FCFLAGS)
1513
CHECK_COMPILE_FLAG(Fortran,-fPIC,FCNOFLAGS)
1514
dnl CHECK_COMPILE_FLAG(Fortran,-rdynamic,FNOFLAGS)
1515
dnl CHECK_COMPILE_FLAG(Fortran,-rdynamic,FFLAGS)
1519
AC_SUBST(DYLIB_SUFFIX,$ff_suffix_dylib)
1521
# Checking wether we can generate some documentation
1522
# --------------------------------------------------
1524
AC_CHECK_PROG(ff_latex,latex,yes,no)
1525
AC_CHECK_PROG(ff_makeindex,makeindex,yes,no)
1526
AC_CHECK_PROG(ff_dvips,dvips,yes,no)
1527
# to translate the figure
1528
AC_CHECK_PROG(ff_pdf2ps,pdf2ps,yes,no)
1529
AC_CHECK_PROGS(EPSTOPDF,[epstopdf pstopdf],[false])
1530
AC_CHECK_PROG(ff_convert,convert,yes,no)
1531
if test "$ff_latex" = yes -a "$ff_makeindex" = yes -a "$ff_dvips" = yes -a $ff_pdf2ps = yes -a $ff_convert = yes;
1533
AC_SUBST(DOCPS,"freefem++doc.ps")
1535
AC_CHECK_PROG(ff_gzip,gzip,yes,no)
1536
if test "$ff_gzip" = yes;
1538
AC_SUBST(DOCPSGZ,"freefem++doc.ps.gz")
1542
# PDF documentation building sometimes poses problems because of
1543
# pdfsync.sty. So we need to be able to disable it.
1545
AC_ARG_ENABLE(pdf,[ --disable-pdf Disable PDF documentation building])
1546
if test "$enable_pdf" != no
1548
AC_CHECK_PROG(ff_pdflatex,pdflatex,yes,no)
1549
if test "$ff_pdflatex" = yes -a $EPSTOPDF != false -a $ff_convert = yes;
1551
AC_SUBST(DOCPDF,"freefem++doc.pdf")
1555
# HISTORY logging through CVS, but only if we are in a CVS working area
1558
AC_CHECK_PROG(ff_history,cvs2cl,yes,no)
1559
if test "$ff_history" = yes
1561
AC_SUBST(HISTORY,history)
1565
# Choosing compilation options for the standard version (in src/std)
1566
# ------------------------------------------------------------------
1568
# The "standard" configured version can use win32 (mingw)
1570
if test "$ff_mingw" = yes
1573
# FFCS does not use FreeFem++-std, and Pcrgraph.cpp does not compile under mingwin64
1574
if test $enable_ffcs = no
1576
ff_stdprog="FreeFem++-std${EXEEXT}"
1577
ff_std_graph_obj=Pcrgraph.$OBJEXT
1580
# ALH - FFCS - 30/11/8 - I need to get the output from FF for FFCS regression tests
1581
if test $enable_ffcs = yes
1583
ff_std_ldflags="-mconsole -mwindows"
1585
ff_std_ldflags=-mwindows
1590
AC_SUBST(STD_GRAPH_OBJ,$ff_std_graph_obj)
1591
AC_SUBST(STD_LDFLAGS,$ff_std_ldflags)
1593
AC_SUBST(STD_LIBS,$ff_std_libs)
1595
# Can we produce an IDE?
1596
# ----------------------
1598
# For development purposes, we may need to use X libraries instead of
1599
# native libraries (mainly to run the programs remotely)
1600
# AC_ARG_WITH(fltk,[ --without-fltk (to suppress explicity --enable-download imply --with-fltk ) ])
1601
# AC_ARG_WITH(xfltk,[ --with-xfltk When recompiling FLTK, use X libraries instead of native Win32 or MacOS])
1602
# remove all fltk stuff
1604
#AC_MSG_NOTICE(without ide/ fltk ..... Please wait the next version.... )
1607
if test "$with_fltk" = no
1610
AC_MSG_NOTICE(without FLTK sorry in next no ide today )
1612
# under mingw use download fltk version
1613
if test "$ff_mingw" = yes
1615
AC_MSG_NOTICE(under mingw not using default FLTK)
1616
enable_default_fltk=no
1619
# Default FLTK (in the machine's default PATH)
1620
if test "$enable_default_fltk" = no
1622
AC_MSG_NOTICE(not using default FLTK)
1626
# Checks that fltk-config exists
1627
ff_fltk_config=fltk-config
1628
AC_CHECK_PROG(ff_fltk,fltk-config,yes,no)
1630
# Checks that FLTK is compiled with threads enabled
1631
AC_MSG_CHECKING(that FLTK is compiled with threads)
1633
[AC_LANG_SOURCE([[#include <FL/Fl.H>
1638
ff_fltk_threads=yes,
1640
AC_MSG_RESULT($ff_fltk_threads)
1641
if test "$ff_fltk_threads" = no
1644
AC_MSG_NOTICE(not using default FLTK because it does not know threads)
1648
# Downloading and compiling FLTK
1649
if test "$ff_fltk" = no -a "$enable_download" = yes
1651
AC_MSG_NOTICE(using downloaded FLTK)
1652
AC_SUBST(DOWNLOAD_FLTK,fltk)
1653
ff_fltk_version=1.1.6
1654
AC_SUBST(FLTK_VERSION,$ff_fltk_version)
1655
ff_fltk_config="$curdir/download//bin/fltk-config"
1659
if test "$ff_fltk" = yes
1661
# For the moment, FreeFem++-ide${EXEEXT} is not built
1662
# because it first needs FreeFEM++ to accept several
1663
# successive runs without restart.
1665
ff_ideprog="FreeFem++-ide${EXEEXT} FreeFem++-cs${EXEEXT} FreeFem++-client${EXEEXT} FreeFem++-server${EXEEXT}"
1666
ff_idetest="./testhighlight.sh"
1667
ff_testideprog="testhighlight${EXEEXT}"
1668
if test "$enable_cygwindll" = yes
1670
AC_SUBST(FLTK_CONFIG_PARAM,"--enable-localzlib --enable-cygwin")
1671
elif test "$ff_mingw" = yes
1673
AC_SUBST(FLTK_CONFIG_PARAM,"--enable-localzlib --disable-cygwin")
1675
AC_SUBST(FLTK_CONFIG_PARAM,"--disable-cygwin")
1678
AC_SUBST(FLTK_CONFIG,$ff_fltk_config)
1683
# end of remove fltk
1685
# Flex compatibility with Bison
1686
# -----------------------------
1688
# If Flex does not know Bison options, it cannot deal with
1689
# src/ide/hl_lex.l++. So we need to make src/ide/hl_lex.c++ up-to-date
1690
# by hand (under Cygwin, "cvs update" does not make hl_lex.c++ newer
1691
# than hl_lex.l++ even if it was when a commit was done).
1692
AC_MSG_CHECKING(flex compatibility with bison)
1693
if test `flex --help|fgrep bison|wc -l` = 0
1696
touch src/ide/hl_lex.c++
1701
# Allow some downloaded tools not to be compiled
1702
# ----------------------------------------------
1704
# $1 = tool name, $2 = dynamic library name, $3 = download directory name if different from $1
1705
m4_define([FFCS_DISABLE_DOWNLOAD],
1706
[AC_ARG_ENABLE($1,[ --disable-$1 Do not download $1])
1707
if test "$enable_$1" = "no"
1709
AC_SUBST([FFCS_COMPILE_$1],"")
1710
AC_SUBST([FFCS_DYLIB_$1],"")
1712
AC_SUBST([FFCS_COMPILE_$1],ifelse($3,,$1,$3))
1713
AC_SUBST([FFCS_DYLIB_$1],$2)
1718
FFCS_DISABLE_DOWNLOAD(fflapack,fflapack.$DYLIB_SUFFIX)
1719
# move FFCS_DISABLE_DOWNLOAD gls , after find gsl ...
1720
FFCS_DISABLE_DOWNLOAD(hips,hips_FreeFem.$DYLIB_SUFFIX)
1721
FFCS_DISABLE_DOWNLOAD(hypre,hypre.$DYLIB_SUFFIX)
1722
FFCS_DISABLE_DOWNLOAD(ipopt,ff-Ipopt.$DYLIB_SUFFIX)
1723
FFCS_DISABLE_DOWNLOAD(lapack,lapack.$DYLIB_SUFFIX)
1724
FFCS_DISABLE_DOWNLOAD(mmg3d,mmg3d-v4.0.$DYLIB_SUFFIX)
1725
FFCS_DISABLE_DOWNLOAD(mshmet,mshmet.$DYLIB_SUFFIX)
1726
FFCS_DISABLE_DOWNLOAD(mumps,"MUMPS_FreeFem.$DYLIB_SUFFIX MUMPS.$DYLIB_SUFFIX")
1727
FFCS_DISABLE_DOWNLOAD(mumps_seq,MUMPS_seq.$DYLIB_SUFFIX,mumps-seq)
1728
FFCS_DISABLE_DOWNLOAD(parms,parms_FreeFem.$DYLIB_SUFFIX)
1729
FFCS_DISABLE_DOWNLOAD(pastix,"interfacepastix.$DYLIB_SUFFIX complex_pastix_FreeFem.$DYLIB_SUFFIX real_pastix_FreeFem.$DYLIB_SUFFIX")
1730
FFCS_DISABLE_DOWNLOAD(scotch,scotch.$DYLIB_SUFFIX)
1731
FFCS_DISABLE_DOWNLOAD(superludist,"complex_SuperLU_DIST_FreeFem.$DYLIB_SUFFIX real_SuperLU_DIST_FreeFem.$DYLIB_SUFFIX dSuperLU_DIST.$DYLIB_SUFFIX")
1732
FFCS_DISABLE_DOWNLOAD(yams,freeyams.$DYLIB_SUFFIX)
1733
FFCS_DISABLE_DOWNLOAD(pipe,pipe.$DYLIB_SUFFIX)
1735
# FFCS - MUMPS_seq has a different Win32 compiler setup from FFCS, so we need to add some extra parameters
1736
if test "$OS" = Windows_NT
1738
CFLAGS="$CFLAGS -DWITHOUT_PTHREAD -DAdd_"
1740
# we also need to satisfy ff-c++ that the pthread are not a blocking point
1741
if test -n "$ff_pthread" ; then
1742
AC_FF_ADDWHERELIB(pthread,"",)
1746
# Find out kernel and libc versions
1747
# ---------------------------------
1749
if test "$ff_win32" != yes -a "$ff_mac" != yes
1751
AC_MSG_CHECKING(kernel version)
1752
ff_kernel_version=`cat /proc/version|perl -e '<STDIN>=~/(\d+\.\d+\.\d+)/;print $1;'`
1753
AC_MSG_RESULT($ff_kernel_version)
1754
AC_SUBST(KERNEL_VERSION,$ff_kernel_version)
1756
AC_MSG_CHECKING(libc version)
1757
ff_libc_version=`ldd /bin/sh | awk '/libc/{print $3}' | xargs readlink | sed -e 's/\.so$//'`
1758
AC_MSG_RESULT($ff_libc_version)
1759
AC_SUBST(LIBC_VERSION,$ff_libc_version)
1761
# def variable pour les makefiles
1763
# creating all makefiles
1764
# ----------------------
1765
ff_bamgprog="bamg${EXEEXT} cvmsh2${EXEEXT}"
1768
AC_SUBST(CNOFLAGS,$CNOFLAGS) dnl for superludist CFLAGS without optim ...
1769
AC_SUBST(FNOFLAGS,$FNOFLAGS) dnl for blacs CFLAGS without optim ...
1770
# The final list of executable programs
1771
AC_SUBST(MEDITPROG,$ff_meditprog)
1773
# ALH - FFCS - 5/1/9 - ffglut cannot be compiled with FFCS under Cygwin because it requires a GLUT versions that works
1774
# with Mingw, and the standard Cygwin Glut is not enough. But FFCS needs a working ffglut on other platforms for testing
1777
if test "$ff_win32" = yes
1779
AC_SUBST(FFGLUTPROG,'')
1781
AC_SUBST(FFGLUTPROG,$ff_ffglutprog)
1784
AC_SUBST(BAMGPROG,$ff_bamgprog)
1785
AC_SUBST(STDPROG,$ff_stdprog)
1786
AC_SUBST(IDEPROG,$ff_ideprog)
1787
AC_SUBST(TESTIDEPROG,$ff_testideprog)
1788
# The final test program
1789
AC_SUBST(IDE_TESTS,$ff_idetest)
1790
ff_progs="FreeFem++-nw $ff_bamgprog $ff_mpiprog $ff_meditprog $ff_ffglutprog"
1794
# hips LD -L/Users/hecht/work/freefem++/download/lib/hips -lio -lhips
1795
# hips INCLUDE -I/Users/hecht/work/freefem++/download/include/hips
1796
# hipssequential LD -L/Users/hecht/work/freefem++/download/lib/hips -lio -lhipssequential
1797
# hipssequential INCLUDE -I/Users/hecht/work/freefem++/download/include/hips
1798
# hypre LD -L/Users/hecht/work/freefem++/download/lib/hypre -lHYPRE
1799
# hypre INCLUDE -I/Users/hecht/work/freefem++/download/include/hypre
1800
#metis LD -L/Users/hecht/work/freefem++/download/lib -lmetis
1801
#metis INCLUDE -I/Users/hecht/work/freefem++/download/include/metis
1802
# mumps LD '-L/Users/hecht/work/freefem++/download//lib -lpord -lmumps_common -ldmumps -lzmumps -lpord'
1803
# mumps INCLUDE '-I/Users/hecht/work/freefem++/download/include'
1804
# parmetis LD -L/Users/hecht/work/freefem++/download/lib -lparmetis -lmetispar
1805
# parmetis INCLUDE -I/Users/hecht/work/freefem++/download/include/metis
1806
# scalapack LD '-L/Users/hecht/work/freefem++/download/lib -lscalapack '
1807
# scalapack INCLUDE '-I/Users/hecht/work/freefem++/download/include'
1808
# ptscotch LD '-L/Users/hecht/work/freefem++/download/lib -lptesmumps -lptscotch -lptscotcherr '
1809
# ptscotch INCLUDE '-I/Users/hecht/work/freefem++/download/include/scotch'
1810
# scotch LD '-L/Users/hecht/work/freefem++/download/lib -lscotch -lscotcherr '
1811
# scotch INCLUDE '-I/Users/hecht/work/freefem++/download/include/scotch'
1812
# superlu LD -L/Users/hecht/work/freefem++/download/lib -lsuperlu
1813
# superlu INCLUDE -I/Users/hecht/work/freefem++/download/include
1814
# superlu_dist LD '-L/Users/hecht/work/freefem++/download/lib -lsuperlu_dist_2.3'
1815
# superlu_dist INCLUDE '-I/Users/hecht/work/freefem++/download/include/superludist'
1816
# tetgen LD -L/Users/hecht/work/freefem++/download/lib -ltet
1817
# tetgen INCLUDE -I/Users/hecht/work/freefem++/download/include/
1818
# arpack LD '-L/Users/hecht/work/freefem++/download/lib' '-larpack'
1819
# arpack INCLUDE '-I/Users/hecht/work/freefem++/download/include'
1820
# umfpack LD '-L/Users/hecht/work/freefem++/download/lib' '-lumfpack'
1821
# umfpack INCLUDE '-I/Users/hecht/work/freefem++/download/include'
1822
# amd LD '-L/Users/hecht/work/freefem++/download/lib' '-lamd'
1823
# amd INCLUDE '-I/Users/hecht/work/freefem++/download/include'
1824
# fftw3 LD '-L/Users/hecht/work/freefem++/download/lib' '-lfftw3'
1825
# fftw3 INCLUDE '-I/Users/hecht/work/freefem++/download/include'
1826
# mmg3d LD '-L/Users/hecht/work/freefem++/download/lib' '-lmmg3d'
1827
# mmg3d INCLUDE '-I/Users/hecht/work/freefem++/download/include'
1830
#if test -f download/pkg/mmg3dlib.tar.gz ;then
1831
# AC_MSG_NOTICE([ Compile : download/pkg/mmg3dlib.tar.gz (3d mesh adapaton)])
1833
# ff_MACOS=`expr "xx $CXXFLAGS" : '.*-mmacosx-version-min=\([0-9.]*\).*'`
1836
# if test "$ff_mac" = yes ; then
1838
# [0-9.]*) ff_MACOS="$ff_MACOS";;
1839
# *) ff_MACOS=`sw_vers -productVersion| awk -F. '{print $1"."$2}'`
1842
# ff_mmg3dlib="libmmg3d-1001-OSX-$ff_MACOS.tar.gz"
1843
# elif test "$ff_win32" = yes ; then
1845
# MINGW32*) ff_mmg3dlib="libmmg3d-1001-MINGW32.tar.gz";;
1846
# MINGW64*) ff_mmg3dlib="libmmg3d-1001-MINGW64.tar.gz";;
1847
# CYWIN*) ff_mmg3dlib="libmmg3d-1001-WIN32.tar.gz";;
1850
# ff_mmg3dlib="libmmg3d-1001-LINUX-$ff_size_ptr.tar.gz"
1853
# if test -f download/pkg/$ff_mmg3dlib ; then
1854
# tar zxf download/pkg/$ff_mmg3dlib -C download
1855
# elif test "enable_download" = yes ; then
1856
# mkdir download/pkg
1858
# $ff_wget_command http://www.freefem.org/ff++/ftp/libmmg3d/$ff_mmg3dlib
1859
# tar zxf $ff_mmg3dlib -C ..
1862
# if test -f "download/lib/libmmg3d.a" ; then
1863
# AC_MSG_CHECKING(for MMG_mmg3dlib in mmg3dlib )
1864
# ff_save_libs="$LIBS"
1865
# LIBS="$LIBS -Ldownload/lib -lmmg3d"
1867
# [AC_LANG_CALL(,MMG_mmg3dlib)],
1871
# rm download/lib/libmmg3d.a download/include/libmmg3d.a
1874
# LIBS="$ff_save_libs"
1875
# AC_MSG_RESULT($ff_mmg3d_ok)
1877
# AC_SUBST(MMG3DLIB_TAR,$ff_mmg3dlib)
1880
AC_SUBST(TEST_FFPP,"../src/nw/FreeFem++")
1881
AC_SUBST(TEST_FFPPMPI,"../src/mpi/ff-mpirun")
1883
ff_with_mpi=-openmpi;
1885
ff_blacs="-lblacsCinit$ff_with_mpi -lblacsF77init$ff_with_mpi -lblacs$ff_with_mpi"
1886
ff_scalapack=-lscalapack
1888
# change MKL interface ...
1889
test -n "$ff_mkl_blacs" && ff_blacs="$ff_mkl_blacs"
1890
test -n "$ff_mkl_scalapack" && ff_scalapack="$ff_mkl_scalapack"
1891
test -n "$ff_mkl_root" && ff_winc="$ff_mkl_root/include/mkl_blas.h"
1894
m4_map([AC_FF_WHERELIB],[
1895
[[mumps],[-ldmumps -lzmumps -lmumps_common -lpord],[dmumps_c.h],[]],
1896
[[mumps_ptscotch],[-lpord_ptscotch -lmumps_common_ptscotch -ldmumps_ptscotch -lzmumps_ptscotch -lpord_ptscotch],[dmumps_c.h]],
1897
[[mumps_scotch],[-lpord_scotch -lmumps_common_scotch -ldmumps_scotch -lzmumps_scotch -lpord_scotch],[dmumps_c.h]],
1898
[[hypre],[-lHYPRE]],
1899
[[fftw3],[-lfftw3],[/usr/include/fftw3.h],[]],
1900
[[superlu_dist],[-lsuperlu-dist],[superlu-dist/superlu_defs.h],[]],
1901
[[superlu],[-lsuperlu],[superlu/slu_ddefs.h],[]],
1902
[[Superlu4],[-lsuperlu4],[superlu4/slu_ddefs.h],[]],
1903
[[blacs],[ -lblacsCinit$ff_with_mpi -lblacsF77init$ff_with_mpi -lblacs$ff_with_mpi],[]],
1904
[[scalapack],[-lscalapack$ff_with_mpi],[]],
1905
[[scotch],[-lscotch -lscotcherr],[]],
1906
[[ptscotch],[-lptscotch -lptscotcherr],[]],
1907
[[metis],[-lscotch -lmetis],[metis/metis.h],[]],
1908
[[metis],[-lscotch -lmetis],[metis.h],[]],
1909
[[parmetis],[-lptscotch -lparmetis],[],[]],
1910
[[freeyams],[-lfreeyams],[freeyamslib.h],[]],
1911
[[mmg3d],[-lmmg3d],[libmmg3d.h],[]],
1912
[[mshmet],[-lmshmet],[],[]],
1913
[[gsl],[-lgsl -lgslcblas -lm],[gsl/gsl_sf.h],[]],
1914
[[parms],[-lparms -litsol -llapack -lblas -lm],[],[]],
1915
[[tetgen],[-ltet],[tetgen.h],[]],
1919
# FFCS - 27/10/11 - Some extra conditionals for things that do not work on certain systems (eg MPI libraries under
1921
# remove gsl if not find ... FK
1923
if test "$ff_where_lib_conf_gsl" == 1 -a -z "$enable_gsl" ; then enable_gsl=no; fi;
1924
if test "$ff_where_lib_conf_mkl" == 1 -a -z "$enable_mkl" ; then enable_pardiso=no; fi;
1925
FFCS_DISABLE_DOWNLOAD(gsl,"gsl.$DYLIB_SUFFIX NewSolver.$DYLIB_SUFFIX")
1926
FFCS_DISABLE_DOWNLOAD(pardiso,PARDISO.$DYLIB_SUFFIX)
1929
AM_CONDITIONAL([FFCS_WINDOWS],[test $OS = Windows_NT])
1934
download/blas/Makefile
1935
download/arpack/Makefile
1936
download/umfpack/Makefile
1938
src/bamglib/Makefile
1939
src/Graphics/Makefile
1944
dnl src/std/Makefile
1948
src/libMesh/Makefile
1950
src/bin-win32/Makefile
1952
examples++-eigen/Makefile
1953
examples++-tutorial/Makefile
1954
examples++-mpi/Makefile
1955
examples++-load/Makefile
1956
examples++-chapt3/Makefile
1957
examples++-bug/Makefile
1958
examples++-other/Makefile
1959
examples++-3d/Makefile
1961
AC_MSG_NOTICE([ freefem++ used download : $enable_download ])
1962
AC_MSG_NOTICE([ -- Dynamic load facility: $ff_dynload ])
1963
AC_MSG_NOTICE([ -- ARPACK (eigen value): $ff_arpack_ok ])
1964
AC_MSG_NOTICE([ -- UMFPACK (sparse solver) $ff_umfpack_ok ])
1965
AC_MSG_NOTICE([ -- BLAS $ff_blas_ok ])
1966
AC_MSG_NOTICE([ -- with MPI $ff_mpi])
1967
AC_MSG_NOTICE([ progs: $ff_progs ])
1968
if test "$ff_umfpack_download" = yes ;then
1969
AC_MSG_NOTICE([ use of download UMFPACK see download/umfpack/SuiteSparse/UMFPACK/README.txt for the License])
1971
if test "$ff_arpack_download" = yes ; then
1972
AC_MSG_NOTICE([ use of download ARPACK see download/arpack/ARPACK/README no License ])
1975
if test "$enable_download" = yes ;then
1976
AC_MSG_NOTICE([ use of download fftw see download/fftw/fftw-3.2/COPYRIGHT ])
1977
AC_MSG_NOTICE([ use of download tetgen see download/tetgen/tetgen1.4.3/LICENSE ])
1978
AC_MSG_NOTICE([ use of download freeyams see download/yams/freeyams.2011.02.22 (suface mesh adaptation) ])
1979
AC_MSG_NOTICE([ use of download mmg3d (v4) see download/mmg3d/mmg3d4/LICENCE.txt ])
1980
AC_MSG_NOTICE([ use of download superlu, metis])
1981
if test -n "$MPICC" ; then
1982
AC_MSG_NOTICE([ try to download: blacs parmetis scalapack scotch superludist pastix hypre hips library])
1985
dnl if test -f download/lib/libmmg3d.a ; then
1986
dnl AC_FF_ADDWHERELIB(mmg3d,-L`pwd`/download/lib,-I`pwd`/download/include)
1987
dnl echo "mmg3d LD '-L`pwd`/download/lib' '-lmmg3d'" >>$ff_where_lib_conf
1988
dnl echo "mmg3d INCLUDE '-I`pwd`/download/include'" >>$ff_where_lib_conf
1990
dnl AC_MSG_NOTICE([ sorry no download/pkg/mmg3dlib.tar.gz 3d mesh adapaton see Dobrzynski Cecile <cecile.dobrzynski@math.u-bordeaux1.fr> ])
1993
if test "$ff_download_blas" = "generic" ; then
1994
AC_MSG_NOTICE([ use of download generic blas and cblas freefem may be slow ])
1995
AC_MSG_NOTICE([ you can try to use the Kazushige Goto s BLAS at http://www.cs.utexas.edu/users/flame/goto/ ])
1996
AC_MSG_NOTICE([ or at http://www.tacc.utexas.edu/~kgoto/ for the best BLAS .])
1997
AC_MSG_NOTICE([ or try to download/compile the altas blas .])
2000
dnl if test -f download/pkg/mmg3dlib.tar.gz ; then
2001
dnl AC_MSG_NOTICE([ Compile : download/pkg/mmg3dlib.tar.gz (3d mesh adapaton)])
2002
dnl elif test "$ff_mmg3d_ok" = yes ; then
2003
dnl AC_MSG_NOTICE([ Use of precompile version : download/pkg/$ff_mmg3dlib (3d mesh adapaton)])
2005
dnl AC_MSG_NOTICE([ sorry no download/pkg/mmg3dlib.tar.gz 3d mesh adapaton see Dobrzynski Cecile <cecile.dobrzynski@math.u-bordeaux1.fr> ])
2007
fi # --- test "$enable_download" = yes ;then
2010
# FFCS: remove this message because it could make the user think that something is broken
2011
if test $enable_ffcs = no
2013
if test "$ff_glut_ok" != yes ; then
2014
AC_MSG_NOTICE([ *********************************************** ])
2015
AC_MSG_NOTICE([ WARNING: you do not have the new grachics tools ])
2016
AC_MSG_NOTICE([ because the configure do not find OpenGL, GLUT or pthread developer stuff ])
2017
AC_MSG_NOTICE([ read the README to find missing package ])
2018
AC_MSG_NOTICE([ F. Hecht ])
2019
AC_MSG_NOTICE([ to install missing package under debian or ubuntu, try: sudo apt-get install freeglut3-dev ])
2020
AC_MSG_NOTICE([ *********************************************** ])
2026
# ispell-local-dictionary:"british"