1 Star 0 Fork 0

dr_li/oomph-lib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
configure.ac 109.04 KB
一键复制 编辑 原始数据 按行查看 历史
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176
#Process this file with autoconf to produce a configure script.
# Initialise autoconfigure: Pass package name, version number and contact email
# The M4 magic to automatically use the svn revision number is from
# http://caulfield.info/emmet/2008/05/get-the-subversion-revision-nu.html
# Slightly wrapped by script which checks if svnversion exists locally
# and, if it does, if we're working on revision controlled version.
# Useful because make mydist is often used to backup entire distribution
# so this should even work for non-developers. If we can't get a
# meaninful revision number for either reason we use 0000 instead.
define([svnversion], esyscmd([sh -c "bin/run_svnversion_if_it_exists.bash|tr -d '\n'"]))dnl
AC_INIT([oomph-lib],[1.0.svnversion],[oomph-lib@maths.manchester.ac.uk])
# config header file
AC_CONFIG_HEADERS(config.h)
# Intialise automake (AM_INIT_AUTOMAKE) using the command specified in this
# file. This is necessary so that we can select different options for
# different versions of automake (newer automake versions are not
# backwards compatible!).
m4_include([config/configure.ac_scripts/automake_init_command_file])
# Checks for programs:
#---------------------
# C++ compiler
AC_PROG_CXX
# C compiler
AC_PROG_CC
# C preprocessor
AC_PROG_CPP
# F77 compiler
AC_PROG_F77
AC_PROG_FC
# Install
AC_PROG_INSTALL
# Create symbolic links
AC_PROG_LN_S
# awk
AC_PROG_AWK
# Sets make macro
AC_PROG_MAKE_SET
# LIBTOOL
AC_PROG_LIBTOOL
# Determine linker flags for fortran
AC_F77_LIBRARY_LDFLAGS
if test -z $ac_cv_prog_f77_v; then
echo "==================================================================="
echo "Empty verbose linking string."
echo "It is likely that the compilation has failed."
echo "Either the Fortran compiler has not been found or it doesn't work"
echo "If your Fortran compiler is in a non-standard location"
echo "please specify by setting the variable F77=/path/to/fortran_compiler"
echo "in your configuration file or as an environment variable."
echo "The value of F77 found used here was $F77"
echo "===================================================================="
exit
fi
# Defined the no-optimisation environment flag for use in oomph_flapack
AC_ARG_VAR([FFLAGS_NO_OPT],[Fortran compiler flags without optimisation])
# Set additional flags for C++ compilation:
#------------------------------------------
# cfortran stuff:
case "$G77" in
yes)
#Test the version number by writing compiling and running
#a small test C++ program
#If the version number is different for the c-compiler and the
#fortran compiler then we're in real trouble!
cat > version_test.cc << EOF
#include<iostream>
int main() {if(__GNUC__ > 3) {std::cout << "yes";}else{std::cout << "no";}}
EOF
$CXX version_test.cc
gcc_version4=`./a.out`
rm ./a.out version_test.cc
if test "$gcc_version4" = yes; then
echo "GNU Compilers > v 4.0, linking with -DgFortran"
AM_CXXFLAGS='-DgFortran'
else
echo "GNU Compilers < v 4.0, linking with -Df2cFortran"
AM_CXXFLAGS='-Df2cFortran'
fi
;;
no)
echo "========================================================"
echo "Not using GNU compiler suite"
echo "You must specify a flag for cfortran.h"
echo "in the CXXFLAGS of your config file."
echo "e.g. -DINTEL_COMPILER for the Intel suite of compilers"
echo "See cfortran.h documentation for further details"
echo "========================================================"
;;
esac
#case "$F77 " in
# *gfortran*)
# AM_CXXFLAGS='-DgFortran'
# AM_FFLAGS=' '
# ;;
# *ifort*)
# AM_CXXFLAGS='-DINTEL_COMPILER'
# AM_FFLAGS=' '
# ;;
# *[[A-Za-z0-9]]*)
# AM_CXXFLAGS='-Df2cFortran'
# AM_FFLAGS=' '
# ;;
# *)
# echo "==================================================";
# echo "Fortran compiler not found. ";
# echo "If your Fortran compiler is in a non-standard location"
# echo "please specify by setting the variable F77=/path/to/fortran_compiler"
# echo "in your configuration file or as an environment variable."
# echo "==================================================";
# exit
# ;;
#esac
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_FFLAGS)
# Prepare variable that can be used to drag along C++ compilation
# flags
accumulated_cpp_flags=''
#...........................................................................
# Start of commands suggested by autoscan.
#
# Andrew: Will need to re-run autoscan on the
# full set of sources *and* decide on what to do if headers are not found.
# This is where the real work starts on making the code portable, I suppose.
# At the moment we simply bail out...
# Checks for header files.
#
# Note: old version was
#
# AC_CHECK_HEADERS([limits.h stdlib.h string.h sys/time.h malloc.h],
#
# but malloc.h doesn't exist on BSD Linux. Since malloc.h was only suggested
# by autoscan, I've experimentally taken it out to see if this breaks
# anything under GNU< Linux (MH 12/01/2007)
#
AC_HEADER_STDC
#AC_CHECK_HEADERS([limits.h stdlib.h string.h sys/time.h],
# [echo "Congratulations -- required headers were found";],
# [echo "==================================================";
# echo "Trouble -- missing header[s]! ";
# echo "==================================================";
# exit])
#Check for the execinfo header
AC_CHECK_HEADER(execinfo.h,[have_execinfo=true;
echo "Can use stacktrace in debugging";],
[have_execinfo=false;
echo "Can't use stacktrace in debugging";])
# Check to see if we're on a Mac (the only system which has
# the OS name "Darwin")
AM_CONDITIONAL(HAVE_DARWIN, test $(uname) == "Darwin")
# Pass result of test to automake (makefiles can now check for
# status of HAVE_STACKTRACE in any Makefile.am:
AM_CONDITIONAL(HAVE_STACKTRACE, test x$have_execinfo = xtrue)
# Add flag (don't use the obvious HAVE_STACKTRACE as this is used by
# other packages too and leads to clashes!)
if test x$have_execinfo = xtrue; then \
accumulated_cpp_flags=`echo $accumulated_cpp_flags " -DOOMPH_HAS_STACKTRACE"`; \
fi;
#Check for the unistd.h header (needed for getpid() in memory monitoring)
AC_CHECK_HEADER(unistd.h,[have_unistdh=true;
echo "Found unistd.h -- can do memory monitoring";],
[have_unistdh=false;
echo "Didn't find unistd.h -- cannot do memory monitoring";])
# Pass result of test to automake (makefiles can now check for
# status of HAVE_UNISTDH in any Makefile.am:
AM_CONDITIONAL(HAVE_UNISTDH, test x$have_unistdh = xtrue)
# Add flag (don't use the obvious HAVE_UNISTDH as this is used by
# other packages too and leads to clashes!)
if test x$have_unistdh = xtrue; then \
accumulated_cpp_flags=`echo $accumulated_cpp_flags " -DOOMPH_HAS_UNISTDH"`; \
fi;
# Check for the fpu_control.h. Needed by triangle. If we don't have it
# use an empty replacement (included via symbolic link during build process
# and hope for the best...)
AC_CHECK_HEADER(fpu_control.h,[have_fpucontrolh=true;
echo "Found fpu_control.h -- can do triangle properly!";],
[have_fpucontrolh=false;
echo "Didn't find fpu_control.h -- using an empty replacement for triangle which may struggle... Keep an eye on it!";])
# Pass result of test to automake (makefiles can now check for
# status of HAVE_FPUCONTROLH in any Makefile.am:
AM_CONDITIONAL(HAVE_FPUCONTROLH, test x$have_fpucontrolh = xtrue)
# Add flag (don't use the obvious HAVE_FPUCONTROLH as this may be used by
# other packages too and may lead to clashes!)
if test x$have_fpucontrolh = xtrue; then \
accumulated_cpp_flags=`echo $accumulated_cpp_flags " -DOOMPH_HAS_FPUCONTROLH"`; \
fi;
# Check for the malloc.h. Needed by metis. If we don't have it
# use an empty replacement
AC_CHECK_HEADER(malloc.h,[have_malloch=true;
echo "Found malloc.h!";],
[have_malloch=false;
echo "Didn't find malloc.h -- using an empty replacement metis... Keep an eye on it!";])
# Pass result of test to automake (makefiles can now check for
# status of HAVE_MALLOCH in any Makefile.am:
AM_CONDITIONAL(HAVE_MALLOCH, test x$have_malloch = xtrue)
# Add flag (don't use the obvious HAVE_MALLOCH as this may be used by
# other packages too and may lead to clashes!)
if test x$have_malloch = xtrue; then \
accumulated_cpp_flags=`echo $accumulated_cpp_flags " -DOOMPH_HAS_MALLOCH"`; \
fi;
# Does C compiler support const?
AC_C_CONST
# Something to do with a stdbool.h header file. Don't quite understand
# the significance; see
# http://web.umr.edu/~gnudoc/single/autoconf-2.5.7/autoconf.html
# for full(er) description and suggested action.
AC_HEADER_STDBOOL
# Does the C compiler support inlining?
AC_C_INLINE
# If size_t is not defined, define size_t to be unsigned
AC_TYPE_SIZE_T
#If pid_t is not defined, define pid_t to be int.
AC_TYPE_PID_T
# Hmm, including this produces warnings during ./configure because
# RANLIB is made obsolete by LIBTOOL. You can either keep in here (in which
# case autoscan doesn't complain) or comment it out (in which case
# you should ignore the warnings in autoscan).
#AC_PROG_RANLIB
# Only needed by matlab part of superlu -- ignore when
# autoscan flags this up...
#AC_FUNC_ERROR_AT_LINE
# Something to do with the way Gnu C handles malloc -- see
# http://web.umr.edu/~gnudoc/single/autoconf-2.5.7/autoconf.html
# Only an issue in external C code (Superlu)
AC_FUNC_MALLOC
# autoscan suggests I should check for these functions. autoconf doesn't
# seem to be able to find them but this causes no problem --> ?
#AC_CHECK_FUNCS([floor pow gethrtime sqrt memchr memset],
# [echo "Congratulations -- required function was found";],
# [echo "==================================================";
# echo "Trouble -- missing function! ";
# echo "==================================================";
# exit])
# END OF COMMANDS SUGGESTED BY autoscan
#...........................................................................
# Cray hack: Static C++ libraries
#--------------------------------
AC_ARG_ENABLE(static-cxx-libs,
[ --enable-static-cxx-libs Pass -all-static to CXX when used as linker (needed when using gnu complier on Crays)],
[want_static_cxx_libs=true],
[want_static_cxx_libs=false])
if test x$want_static_cxx_libs = xtrue; then
AC_SUBST([CXXLD], ['$(CXX) -all-static'])
echo "Using -all-static flag for CXX linker"
else
AC_SUBST([CXXLD], ['$(CXX)'])
echo "Not using -all-static flag for CXX linker"
fi
# Do we have a sufficiently recent version of libtool installed?
#---------------------------------------------------------------
# Check to see if we're on a Mac (the only system which has
# the OS name "Darwin")
if test $(uname) == "Darwin"
then
LIBTOOL_COMMAND=glibtool;
# MacOS has problems compiling some external libraries because
# of implicit function definitions
accumulated_cpp_flags=`echo $accumulated_cpp_flags `" -Wno-implicit-function-declaration"
else
LIBTOOL_COMMAND=libtool;
fi
# Convert libtool version number into single int -- strip dots and
# accomodate up to three digits for each part version id
libtool_version=`$LIBTOOL_COMMAND --version | \
head -n 1 | $AWK '{ print $NF}' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
# Need at least version 242 --> 2004002
if test "$libtool_version" -ge 2004002; then
echo "Congratulations!"
echo "I have located a (sufficiently) up-to-date version of libtool ( "
echo $libtool_version" ) and can build cgal and associated libraries."
have_up_to_date_libtool=true
else
echo " "; \
echo "==============================================================="; \
echo "Trouble: Your version of libtool is: " `$LIBTOOL_COMMAND --version | head -n 1 | $AWK '{ print $NF}'`
echo "Please upgrade to version 2.4.2 or higher."
echo "I cannot/will not build cgal and associated libraries."
echo "==============================================================="; \
echo " "; \
have_up_to_date_libtool=false
fi
AM_CONDITIONAL(HAVE_UP_TO_DATE_LIBTOOL, test x$have_up_to_date_libtool = xtrue)
# Do we have libtool at all?
AC_CHECK_PROG(have_libtool,$LIBTOOL_COMMAND,true,false)
AM_CONDITIONAL(HAVE_LIBTOOL, test x$have_libtool = xtrue)
# Do we have cmake installed?
#-----------------------------
AC_CHECK_PROG(have_cmake,cmake,true,false)
if test x$have_cmake = xfalse; then \
echo " "; \
echo "================================================================="; \
echo "Cannot find cmake on your system"; \
echo "---> Will not be able to build Trilinos > 9 and cgal etc."; \
echo "If you want to build Trilinos 10 or higher "; \
echo "please get your system administrator to install cmake for you. "; \
echo " "; \
echo "=================================================================="; \
echo " "; \
else \
echo "Congratulations! I have located cmake."; \
fi
AM_CONDITIONAL(HAVE_CMAKE, test x$have_cmake = xtrue)
# Do we have a sufficiently recent version of cmake installed?
#---------------------------------------------------------------
have_up_to_date_cmake=false
if test x$have_cmake = xtrue; then \
# Convert libtool version number into single int -- strip dots and
# accomodate up to three digits for each part version id
cmake_version=`cmake --version | \
head -n 1 | $AWK '{ print $NF}' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
# Need at least version 2.8.11 --> 2008011
if test "$cmake_version" -ge 2008011; then
echo "Congratulations!"
echo "I have located a (sufficiently) up-to-date version of cmake ( "
echo $cmake_version" ) and can build cgal and associated libraries."
have_up_to_date_cmake=true
else
echo " "; \
echo "==============================================================="; \
echo "Trouble: Your version of cmake is: " `cmake --version | head -n 1 | $AWK '{ print $NF}'`
echo "Please upgrade to version 2.8.1 or higher."
echo "I cannot/will not build cgal and associated libraries."
echo "==============================================================="; \
echo " "; \
have_up_to_date_cmake=false
fi
fi
AM_CONDITIONAL(HAVE_UP_TO_DATE_CMAKE, test x$have_up_to_date_cmake = xtrue)
# Do we have (a sufficiently recent version of) doxygen installed?
#-----------------------------------------------------------------
AC_CHECK_PROG(have_doxygen,doxygen,true,false)
if test x$have_doxygen = xfalse; then \
echo " "; \
echo "===================================================="; \
echo "Cannot find doxygen on your system"; \
echo "---> documentation cannot be generated. "; \
echo " "; \
echo "You can either obtain the (built) oomph-lib "; \
echo "documentation online at "; \
echo " "; \
echo " http://www.oomph-lib.org/ "; \
echo " "; \
echo "or download doxygen from "; \
echo " "; \
echo " http://www.doxygen.org/ "; \
echo " "; \
echo "===================================================="; \
echo " "; \
else \
# Convert doxygen version number into single int -- strip dots and
# accomodate up to three digits for each part version id
doxygen_version=`doxygen --version | \
$AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
# Need at least version 1.9.2 --> 1009002
if test "$doxygen_version" -ge 1009002; then
echo "Congratulations!"
echo "I have located a (sufficiently) up-to-date version of doxygen:" \
`doxygen --version`
echo "and can build the documentation."
else
echo " "; \
echo "==============================================================="; \
echo "Trouble: Your version of doxygen is: " `doxygen --version`
echo "Please upgrade to version 1.9.3 or higher."
echo " "; \
echo " http://www.doxygen.org/ "; \
echo " "; \
echo "I cannot build the documentation..."
echo " "; \
echo "Meanwhile you can obtain the built oomph-lib documentation from"; \
echo " "; \
echo " http://www.oomph-lib.org/ "; \
echo " "; \
echo "==============================================================="; \
echo " "; \
have_doxygen=false
fi
fi
AM_CONDITIONAL(HAVE_DOXYGEN, test x$have_doxygen = xtrue)
# Do we have triangle installed online?
#---------------------------------------
AC_CHECK_PROG(have_online_triangle,triangle,true,false)
if test x$have_online_triangle = xfalse; then \
echo " "; \
echo "===================================================="; \
echo "Cannot find triangle on your system"; \
echo "---> cannot run fig2poly test. "; \
echo " "; \
echo "The source code for triangle may be obtained from "; \
echo " "; \
echo " http://www.cs.cmu.edu/~quake/triangle.html "; \
echo " "; \
echo "Please ask your systems administrator to install it "; \
echo "on your machine. "; \
echo " "; \
echo "NOTE: Maybe you do have triangle installed in an "; \
echo "unusual place -- installing a symbolic link from"; \
echo "a directory in the normal search path to your actual "; \
echo "installation should then all that's required. "; \
echo "===================================================="; \
echo " "; \
else \
echo "Congratulations! I have located triangle and can test the "; \
echo "triangle-based mesh generation procedures."; \
fi
AM_CONDITIONAL(HAVE_ONLINE_TRIANGLE, test x$have_online_triangle = xtrue)
# Do we have tetgen installed?
#-------------------------------
AC_CHECK_PROG(have_tetgen,tetgen,true,false)
if test x$have_tetgen = xfalse; then \
echo " "; \
echo "===================================================="; \
echo "Cannot find tetgen on your system"; \
echo " "; \
echo "The source code for tetgen may be obtained from "; \
echo " "; \
echo " http://tetgen.berlios.de/ "; \
echo " or "; \
echo " http://tetgen.org/ "; \
echo " "; \
echo "Please ask your systems administrator to install it "; \
echo "on your machine. "; \
echo " "; \
echo "NOTE: Maybe you do have tetgen installed in an "; \
echo "unusual place -- installing a symbolic link from"; \
echo "a directory in the normal search path to your actual "; \
echo "installation should then all that's required. "; \
echo "===================================================="; \
echo " "; \
else \
echo "Congratulations! I have located tetgen and can test the "; \
echo "tetgen-based mesh generation procedures."; \
fi
AM_CONDITIONAL(HAVE_TETGEN, test x$have_tetgen = xtrue)
# Suppress build of pdf-based documentation?
# If yes, run configure as './configure --enable-suppress-pdf-doc'
AC_ARG_ENABLE(suppress-pdf-doc,
[ --enable-suppress-pdf-doc Suppress building of oomph-lib's doxygen-based pdf documentation],
[want_pdf_doc=false],
[want_pdf_doc=true])
# Do we have pdflatex installed?
#-------------------------------
AC_CHECK_PROG(have_pdf_latex,pdflatex,true,false)
if test x$have_pdf_latex = xfalse; then \
echo " "; \
echo "===================================================="; \
echo "Cannot find pdflatex on your system"; \
echo "---> latex documentation cannot be generated. "; \
echo " "; \
echo "You can either lookup the documentation online at "; \
echo " "; \
echo " http://www.oomph-lib.org/ "; \
echo " "; \
echo "or ask your systems administrator to install pdflatex "; \
echo "on your machine. "; \
echo " "; \
echo "NOTE: Maybe you do have pdflatex installed in an "; \
echo "unusual place -- installing a symbolic link from"; \
echo "a directory in the normal search path to your actual "; \
echo "installation should then all that's required. "; \
echo "===================================================="; \
echo " "; \
else \
echo "Congratulations! I have located pdflatex and can build the "; \
echo "latex documentation in the doc directory."; \
if test x$want_pdf_doc = xfalse; then \
echo "BUILDING OF PDF DOC SUPPRESSED VIA CONFIGURE FLAG!"; \
have_pdf_latex=false; \
fi \
fi
echo "have_pdf_latex $have_pdf_latex"
AM_CONDITIONAL(HAVE_PDF_LATEX, test x$have_pdf_latex = xtrue)
# Do we have python installed?
#-----------------------------
AC_CHECK_PROG(have_python,python,true,false)
if test x$have_python = xfalse; then \
echo " "; \
echo "================================================================="; \
echo "Cannot find python on your system"; \
echo "---> Will not be able to check the accuracy of "; \
echo " the self tests with bin/fpdiff.py :( "; \
echo " "; \
echo "Please get your system administrator to install python for you. "; \
echo " "; \
echo "=================================================================="; \
echo " "; \
else \
echo "Congratulations! I have located python."; \
fi
AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xtrue)
# Do we have validata?
#---------------------
AC_CHECK_FILES(demo_drivers/poisson/two_d_poisson_flux_bc_adapt/validata/results.dat.gz,
echo "Found validata"; have_validata=true,
echo "Not found validata"; have_validata=false)
if test x$have_validata = xfalse; then \
echo " "; \
echo "================================================================="; \
echo "This distribution does not seem to have validata"; \
echo "(based on existence of demo_drivers/poisson/two_d_poisson_flux_bc_adapt/validata/results.dat.gz)"; \
echo "---> Will not be able to check the accuracy of "; \
echo " the self tests with bin/fpdiff.py :( "; \
echo " "; \
echo "=================================================================="; \
echo " "; \
else \
echo "This distribution does seem to have validata."; \
echo "(based on existence of demo_drivers/poisson/two_d_poisson_flux_bc_adapt/validata/results.dat.gz)"; \
fi
AM_CONDITIONAL(HAVE_VALIDATA, test x$have_validata = xtrue)
# Can we compare against validata?
#---------------------------------
compare_against_validata=false;
if test x$have_python = xtrue; then \
if test x$have_validata = xtrue; then \
compare_against_validata=true; \
fi \
fi
if test x$compare_against_validata = xtrue; then \
echo "Will compare against validata "; \
else \
echo "Will not compare against validata "; \
fi
AM_CONDITIONAL(COMPARE_AGAINST_VALIDATA, test x$compare_against_validata = xtrue)
# Do we have the sources for the HSL frontal solver in external_src?
#-------------------------------------------------------------------
AC_CHECK_FILES(external_src/oomph_hsl/frontal.f,
echo "Found external_src/oomph_hsl/frontal.f"; have_hsl_sources=true,
echo "Not found external_src/oomph_hsl/frontal.f"; have_hsl_sources=false)
#If we don't have them check if they are private/external_src and make sym link
#------------------------------------------------------------------------------
if test x$have_hsl_sources = xfalse; then \
AC_CHECK_FILES(private/external_src/hsl/frontal.f,
echo "Found private/external_src/hsl/frontal.f"; have_hsl_sources_in_private_external_src=true,
echo "Not found private/external_src/hsl/frontal.f"; have_hsl_sources_in_private_external_src=false)
if test x$have_hsl_sources_in_private_external_src = xtrue; then \
echo "Making symlink"; \
ln -s ../../private/external_src/hsl/frontal.f external_src/oomph_hsl/frontal.f;\
have_hsl_sources=true;\
else \
echo "Not making symlink";\
fi; \
fi;
# Now do the final check if we have the sources for the HSL frontal solver
#-------------------------------------------------------------------------
AM_CONDITIONAL(HAVE_HSL_SOURCES, test x$have_hsl_sources = xtrue)
# Do we have the sources for the ARPACK Arnoldi solver?
#---------------------------------------------------
AC_CHECK_FILES(external_src/oomph_arpack/all_arpack_sources.f,
echo "Found external_src/oomph_arpack/all_arpack_sources.f"; have_arpack_sources=true,
echo "Not found external_src/oomph_arpack/all_arpack_sources.f"; have_arpack_sources=false)
#If we don't have them check if they are private/external_src and make sym link
#------------------------------------------------------------------------------
if test x$have_arpack_sources = xfalse; then \
AC_CHECK_FILES(private/external_src/arpack/all_arpack_sources.f,
echo "Found private/external_src/arpack/all_arpack_sources.f"; have_arpack_sources_in_private_external_src=true,
echo "Not found private/external_src/arpack/all_arpack_sources.f"; have_arpack_sources_in_private_external_src=false)
if test x$have_arpack_sources_in_private_external_src = xtrue; then \
echo "Making symlink"; \
ln -s ../../private/external_src/arpack/all_arpack_sources.f external_src/oomph_arpack/all_arpack_sources.f;\
have_arpack_sources=true;\
else \
echo "Not making symlink";\
fi; \
fi;
AM_CONDITIONAL(HAVE_ARPACK_SOURCES, test x$have_arpack_sources = xtrue)
AM_CONDITIONAL(WANT_EIGENPROBLEM_TESTS, test x$have_arpack_sources = xtrue)
# Build flags that can be set during configure stage
#---------------------------------------------------
# Dummies to produce better output for ./configure --help
AC_ARG_ENABLE(dummy1,[ ])
AC_ARG_ENABLE(dummy2,[Oomph-lib options: ])
# Is MPI build required?
# If yes, run configure as './configure --enable-MPI'
AC_ARG_ENABLE(MPI,
[ --enable-MPI Build oomph-lib MPI routines],
[want_mpi=true],
[want_mpi=false])
# Pass result of test to automake (makefiles can now check for
# status of WANT_MPI in any Makefile.am, like this:
#
# # WANT_MPI flag is set by autoconf
# #---------------------------------
# if WANT_MPI
# SUBDIRS = $(non_mpi_sub_dirs) $(mpi_sub_dirs)
# else
# SUBDIRS = $(non_mpi_sub_dirs)
# endif
#
AM_CONDITIONAL(WANT_MPI, test x$want_mpi = xtrue)
# Add flag (don't use the obvious HAVE_MPI as this is used by
# other packages too and leads to clashes!)
if test x$want_mpi = xtrue; then \
accumulated_cpp_flags=`echo $accumulated_cpp_flags " -DOOMPH_HAS_MPI"`; \
fi;
# Do we want to run the gmsh tests?
AC_ARG_WITH(gmsh-self-tests,
[ --with-gmsh-self-tests[=GMSH_RUN_COMMAND] run gmsh self-tests. Requires
specification of the string required to run gmsh
from the command line. GMSH_RUN_COMMAND. E.g. if
gmsh on your machine needs to be run with
/usr/bin/gmsh
then set GMSH_RUN_COMMAND to "/usr/bin/gmsh"],[
if test "$withval" != "no" -a "$withval" != "yes"; then
run_gmsh_self_tests=true
GMSH_RUN_COMMAND=$withval
fi
])
AC_SUBST(GMSH_RUN_COMMAND)
# Do we want to run the mpi tests?
AC_ARG_WITH(mpi-self-tests,
[ --with-mpi-self-tests[=MPI_RUN_COMMAND] run mpi self-tests on two processors
using MPI_RUN_COMMAND. E.g. if a parallel executable
on your machine needs to be run with
mpirun -np 2 a.out
then set MPI_RUN_COMMAND to "mpirun -np 2"],[
if test "$withval" != "no" -a "$withval" != "yes"; then
run_mpi_self_tests=true
MPI_RUN_COMMAND=$withval
fi
])
AC_SUBST(MPI_RUN_COMMAND)
# Do we want to run the mpi self tests which involves more than two cores?
AC_ARG_WITH(mpi-self-tests-variablenp,
[ --with-mpi-self-tests-variablenp[=MPI_VARIABLENP_RUN_COMMAND] run mpi self-tests on multiple processors
using MPI_VARIABLENP_RUN_COMMAND. E.g. if a parallel executable
on your machine needs to be run with
mpirun -np 2 a.out
then set MPI_VARIABLENP_RUN_COMMAND to "mpirun -np OOMPHNP"],[
if test "$withval" != "no" -a "$withval" != "yes"; then
run_mpi_self_tests_variablenp=true
MPI_VARIABLENP_RUN_COMMAND=$withval
fi
],[run_mpi_self_tests_variablenp=false])
# Perform the substitution
AC_SUBST(MPI_VARIABLENP_RUN_COMMAND)
# # WANT_MPI_VARIABLENP flag is set by autoconf
# #---------------------------------
# if WANT_MPI_VARIABLENP
# SUBDIRS = $(non_mpi_variablenp_sub_dirs) $(mpi_variablenp_sub_dirs)
# else
# SUBDIRS = $(non_mpi_variablenp_sub_dirs)
# endif
AM_CONDITIONAL(WANT_MPI_VARIABLENP, test x$run_mpi_self_tests_variablenp = xtrue)
# Do we want to build Trilinos dynamically?
AC_ARG_ENABLE(dynamic_linking_for_trilinos,
[ --enable-dynamic-linking-for-trilinos Build trilinos as a
shared library instead
of a static library],
[dynamic_linking_for_trilinos_requested=true],
[dynamic_linking_for_trilinos_requested=false])
# Pass result of test to automake (makefiles can now check for
# status of WANT_DYNAMIC_BUILD_OF_TRILINOS in any Makefile.am)
AM_CONDITIONAL(WANT_DYNAMIC_BUILD_OF_TRILINOS, test x$dynamic_linking_for_trilinos_requested = xtrue)
# Do we need multiple teuchos sub-libraries
AC_ARG_ENABLE(multiple_teuchos_libraries,
[ --enable-multiple_teuchos_libraries Assume that the
version of trilinos
provides multiple
teuchos (sub-)libraries],
[multiple_teuchos_libs_requested=true],
[multiple_teuchos_libs_requested=false])
# Suppress build of extensive documentation?
# If yes, run configure as './configure --enable-suppress-doc'
AC_ARG_ENABLE(suppress-doc,
[ --enable-suppress-doc Suppress building of oomph-lib's doxygen-based documentation],
[want_doc=false],
[want_doc=true])
#If the doc directory does not exist, then you can't have it
AC_CHECK_FILE(doc,[],[want_doc=false])
# Pass result of test to automake (makefiles can now check for
# status of WANT_DOC in any Makefile.am
AM_CONDITIONAL(WANT_DOC, test x$want_doc = xtrue)
# Suppress extended self-tests?
# If yes, run configure as './configure --enable-suppress-extended-self-tests'
AC_ARG_ENABLE(suppress-extended-self_tests,
[ --enable-suppress-extended-self-tests Suppress build/running of oomph-lib's extended self tests for all libraries],
[want_extended_self_tests=false],
[want_extended_self_tests=true])
# Pass result of test to automake (makefiles can now check for
# status of WANT_DOC in any Makefile.am
AM_CONDITIONAL(WANT_EXTENDED_SELF_TESTS, test x$want_extended_self_tests = xtrue)
# Suppress build of extensive demo codes?
# If yes, run configure as './configure --enable-suppress-demo'
AC_ARG_ENABLE(suppress-demo,
[ --enable-suppress-demo Suppress build/check of oomph-lib's demo codes],
[want_demo=false],
[want_demo=true])
# Pass result of test to automake (makefiles can now check for
# status of WANT_DEMO in any Makefile.am
AM_CONDITIONAL(WANT_DEMO, test x$want_demo = xtrue)
# Suppress build of user sources/libraries?
# If yes, run configure as './configure --enable-suppress-user-src'
AC_ARG_ENABLE(suppress-user-src,
[ --enable-suppress-user-src Suppress build/check of user sources/libraries],
[want_user_src=false],
[want_user_src=true])
# Pass result of test to automake (makefiles can now check for
# status of WANT_USER_SRC in any Makefile.am
AM_CONDITIONAL(WANT_USER_SRC, test x$want_user_src = xtrue)
# Replace include files by links?
# If yes, run configure as './configure --enable-symbolic_links_for_headers'
AC_ARG_ENABLE(symbolic-links-for-headers,
[ --enable-symbolic-links-for-headers Use symbolic links for header files; useful during development],
[want_sym_link=true],
[want_sym_link=false])
# Pass result of test to automake (makefiles can now check for
# status of SYMBOLIC_LINKS_FOR_HEADERS in any Makefile.am
AM_CONDITIONAL(SYMBOLIC_LINKS_FOR_HEADERS, test x$want_sym_link = xtrue)
# Find user_src subdirectories
USER_SRC_SUBDIRECTORIES=`cd user_src/ && echo */`
AC_SUBST(USER_SRC_SUBDIRECTORIES)
# Find user_drivers subdirectories
USER_DRIVERS_SUBDIRECTORIES=`cd user_drivers/ && echo */`
AC_SUBST(USER_DRIVERS_SUBDIRECTORIES)
# Link gfortran libraries when building oomph_flapack library
# This is a workaround to a problem with the latest versions of
# gfortran (ubuntu13.10 -- seems like a bug to use so we're not
# hardcoding it here..
# Run configure with './configure --enable_use_gfortran_libraries_for_oomph_flapack'
AC_ARG_ENABLE(use-gfortran-libraries-for-oomph-flapack,
[ --enable-use-gfortran-libraries-for-oomph-flapack Link gfortran libraries when building oomph_flapack library (workaround for ubuntu 13.10 feature(bug?)],
[use_gfortran_libraries_for_oomph_flapack=true],
[use_gfortran_libraries_for_oomph_flapack=false])
# Pass result of test to automake (makefiles can now check for
# status of ADD_LGFORTRAN_TO_OOMPH_LAPACK in any Makefile.am
AM_CONDITIONAL(ADD_LGFORTRAN_TO_OOMPH_LAPACK, test x$use_gfortran_libraries_for_oomph_flapack = xtrue)
#----------------------
# CGAL stuff
#----------------------
# Suppress build of cgal and underlying third party distributions?
# If yes, run configure as './configure --enable-suppress-cgal-build'
AC_ARG_ENABLE(suppress-cgal-build,
[ --enable-suppress-cgal-build Suppress building of cgal and underlying third party distributions],
[want_cgal_build=false],
[want_cgal_build=true])
if test x$have_up_to_date_libtool = xfalse; then
want_cgal_build=false
fi
if test x$have_up_to_date_cmake = xfalse; then
want_cgal_build=false
fi
# Pass result of test to automake (makefiles can now check for
# status of WANT_CGAL in any Makefile.am)
AM_CONDITIONAL(WANT_CGAL_BUILD, test x$want_cgal_build = xtrue)
# Do we want to install cgal and associated third party distributions
# in permament location?
AC_ARG_WITH(cgal-permanent-installation-dir,
[ --with-cgal-permanent-installation-dir[=ABSOLUTE_PATH_TO_PERMAMENT_INSTALL_DIRECTORY] Install cgal and associated third party distributions permamently
in specified directory.],[
if test "$withval" != "no" -a "$withval" != "yes"; then
install_cgal_in_permanent_dir=true
CGAL_PERMANENT_INSTALLATION_DIR=$withval
fi
])
AC_SUBST(CGAL_PERMANENT_INSTALLATION_DIR)
# Pass result of test to automake (makefiles can now check for
# status of CGAL_PERMANENT_INSTALLATION_DIR_SPECIFIED in any Makefile.am)
AM_CONDITIONAL(CGAL_PERMANENT_INSTALLATION_DIR_SPECIFIED, test x$install_cgal_in_permanent_dir = xtrue)
if test x$have_up_to_date_libtool = xtrue; then
if test x$have_up_to_date_cmake = xtrue; then
if test x$install_cgal_in_permanent_dir = xtrue; then
if test -e $CGAL_PERMANENT_INSTALLATION_DIR; then
echo "Permanent install directory for CGAL and associated third party"
echo "distributions"
echo " "
echo " "$CGAL_PERMANENT_INSTALLATION_DIR
echo " "
echo "already exists."
else
mkdir $CGAL_PERMANENT_INSTALLATION_DIR
echo " "
echo "Created permanent install directory for CGAL and associated"
echo "third party distributions:"
echo " "
echo " "$CGAL_PERMANENT_INSTALLATION_DIR
echo " "
fi
fi
fi
fi
#----------------------
# End CGAL stuff
#----------------------
# Auto-detect directories in private/*
# -----------------------------------------------------------------------
# This information is used in "Makefile.am"s within private/ to include
# directories from private/ when running `make dist`. In particular it has
# nothing to do with the creation of Makefile s by configure.
# Do we have private directory?
AC_CHECK_FILES(private,
echo "Found private"; have_private_directory=true,
have_private_directory=false)
AM_CONDITIONAL(HAVE_PRIVATE_DIRECTORY, test x$have_private_directory = xtrue)
# Define subdirectories in private directory
if test x$have_private_directory = xtrue; then \
PRIVATE_DIR="private"; \
# A hack to exclude the private/external_src directory from DIST_SUBDIRS
# (it's handled by EXTRA_DIST)
PRIVATE_SUBDIRECTORIES=`cd private/ && echo */ | tr ' ' '\n' | grep -v 'external_src' | tr '\n' ' '`; \
echo "Do have private subdirectories" $PRIVATE_SUBDIRECTORIES; \
else \
PRIVATE_DIR="";\
PRIVATE_SUBDIRECTORIES=""; \
echo "Don't have private subdirectories: " $PRIVATE_SUBDIRECTORIES; \
fi;
AC_SUBST(PRIVATE_DIR)
AC_SUBST(PRIVATE_SUBDIRECTORIES)
# Do we have private user sources?
AC_CHECK_FILES(private/user_src,
echo "Found private/user_src"; have_private_user_sources=true,
have_private_user_sources=false)
AM_CONDITIONAL(HAVE_PRIVATE_USER_SRC, test x$have_private_user_sources = xtrue)
# Define subdirectories in private user src directory
if test x$have_private_user_sources = xtrue; then \
PRIVATE_USER_SRC_SUBDIRECTORIES=`cd private/user_src/ && echo */`
echo "Do have private/user_src: " $PRIVATE_USER_SRC_SUBDIRECTORIES; \
else \
PRIVATE_USER_SRC_SUBDIRECTORIES=""; \
echo "Don't have private/user_src: " $PRIVATE_USER_SRC_SUBDIRECTORIES; \
fi;
AC_SUBST(PRIVATE_USER_SRC_SUBDIRECTORIES)
# Do we have private user drivers?
AC_CHECK_FILES(private/user_drivers,
echo "Found private/user_drivers"; have_private_user_drivers=true,
have_private_user_drivers=false)
AM_CONDITIONAL(HAVE_PRIVATE_USER_DRIVERS, test x$have_private_user_drivers = xtrue)
# Define subdirectories in private user drivers directory
if test x$have_private_user_drivers = xtrue; then \
PRIVATE_USER_DRIVER_SUBDIRECTORIES=`cd private/user_drivers/ && echo */`
echo "Do have private/user_drivers: " $PRIVATE_USER_DRIVER_SUBDIRECTORIES; \
else \
PRIVATE_USER_DRIVER_SUBDIRECTORIES=""; \
echo "Don't have private/user_drivers: " $PRIVATE_USER_DRIVER_SUBDIRECTORIES; \
fi;
AC_SUBST(PRIVATE_USER_DRIVER_SUBDIRECTORIES)
# Initialiase flags that contains all external libraries that come with
#----------------------------------------------------------------------
# their own distribution and may be installed anywhere.
#------------------------------------------------------
# These are distributed to all Makefile.am-s via the AM_CPPFLAGS
#---------------------------------------------------------------
# and AM_LDFLAGS variables so *everything* links against them
#------------------------------------------------------------
external_dist_libraries=''
external_dist_libraries_lib=''
external_dist_libraries_include=''
#................................................................
#................................................................
#---------------------------------------------------
# Potential location for the blas libraries.
#
# If the complete blas library is available on
# your machine, specify the absolute path to the
# library with --with-blas
#----------------------------------------------------
BLAS_LIB=
check_for_blas=false
AC_ARG_WITH(blas,
[ --with-blas[=ABSOLUTE_PATH] use blas library specified via ABSOLUTE PATH
e.g. /usr/local/lib/blas.a
or specify "auto" (without quotation marks!)
if the library is specified automatically
by your compiler/linker],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_blas=true
BLAS_LIB=$withval
fi
])
# Do they exist?
have_blas=false
if test x$check_for_blas = xtrue; then \
if test -e $BLAS_LIB; then \
have_blas=true; \
echo "Found the blas library "; \
echo " "; \
echo " " $BLAS_LIB ; \
echo " "; \
# Make the variable available to all Makefile.am-s
AC_SUBST(BLAS_LIB)
else \
if test "$BLAS_LIB" == "auto"; then
have_blas=true; \
echo "Will assume that blas library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_blas=false; \
echo "Did NOT find the blas library"; \
echo " "; \
echo " " $BLAS_LIB ; \
echo " "; \
fi; \
fi; \
else \
echo "No blas library specified"; \
fi
#Tell everybody about it...
AM_CONDITIONAL(ALREADY_HAVE_BLAS, test x$have_blas = xtrue)
#................................................................
#................................................................
#---------------------------------------------------
# Potential location for the lapack libraries.
#
# If the complete lapack library is available on
# your machine, specify the absolute path to the
# library with --with-lapack
#----------------------------------------------------
LAPACK_LIB=
check_for_lapack=false
AC_ARG_WITH(lapack,
[ --with-lapack[=ABSOLUTE_PATH] use lapack library specified via ABSOLUTE PATH
e.g. /usr/local/lib/lapack.a
or specify "auto" (without quotation marks!)
if the library is specified automatically
by your compiler/linker],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_lapack=true
LAPACK_LIB=$withval
fi
])
# Do they exist?
have_lapack=false
if test x$check_for_lapack = xtrue; then \
if test -e $LAPACK_LIB; then \
have_lapack=true; \
echo "Found the lapack library "; \
echo " "; \
echo " " $LAPACK_LIB ; \
echo " "; \
# Make the variable available to all Makefile.am-s
AC_SUBST(LAPACK_LIB)
else \
if test "$LAPACK_LIB" == "auto"; then
have_lapack=true; \
echo "Will assume that lapack library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_lapack=false; \
echo "Did NOT find the lapack library"; \
echo " "; \
echo " " $LAPACK_LIB ; \
echo " "; \
fi \
fi; \
else \
echo "No lapack library specified"; \
fi
#Tell everybody about it...
AM_CONDITIONAL(ALREADY_HAVE_LAPACK, test x$have_lapack = xtrue)
#................................................................
#................................................................
#----------------------------------------------------------------
# Allow suppression of oomph-lib's triangle build (there are some subtle
# comiler problems on some machines; if they exist we'd rather bin
# the third-party code rather than endangering the entire oomph-lib
# build
#----------------------------------------------------------------
have_triangle_lib=false
AC_ARG_ENABLE(suppress-triangle,
[ --enable-suppress-triangle Supress build/use of
oomph-lib's own copy of the triangle library. ],
[suppress_triangle=true],
[suppress_triangle=false])
if test x$suppress_triangle = xtrue; then
echo "Suppressing build of oomph-lib's own copy of the triangle library."
echo "This disables a lot of useful functionality but may be"
echo "necessary where the compiler struggles to compile the"
echo "triangle sources. In that case, triangle should be "
echo "installed separately (by whatever method it takes) "
echo "and included in the linker path (similar to the way we handle "
echo "blas and lapack, say), but this hasn't been implemented"
echo "in our build machinery. Please contact the developers if you"
echo "need this..."
else
echo "Building/using oomph-lib's own copy of the triangle library"
fi
#Tell everybody about it...
AM_CONDITIONAL(SUPPRESS_TRIANGLE_LIB, test x$suppress_triangle = xtrue)
# Add flag
if test x$suppress_triangle = xfalse; then \
accumulated_cpp_flags=`echo $accumulated_cpp_flags " -DOOMPH_HAS_TRIANGLE_LIB"`; \
fi;
#................................................................
#----------------------------------------------------------------
# Allow suppression of oomph-lib's tetgen build (there may be subtle
# comiler problems on some machines; if they exist we'd rather bin
# the third-party code rather than endangering the entire oomph-lib
# build
#----------------------------------------------------------------
have_tetgen_lib=false
AC_ARG_ENABLE(suppress-tetgen,
[ --enable-suppress-tetgen Supress build/use of
oomph-lib's own copy of the tetgen library. ],
[suppress_tetgen=true],
[suppress_tetgen=false])
if test x$suppress_tetgen = xtrue; then
echo "Suppressing build of oomph-lib's own copy of the tetgen library."
echo "This disables a lot of useful functionality but may be"
echo "necessary where the compiler struggles to compile the"
echo "tetgen sources. In that case, tetgen should be "
echo "installed separately (by whatever method it takes) "
echo "and included in the linker path (similar to the way we handle "
echo "blas and lapack, say), but this hasn't been implemented"
echo "in our build machinery. Please contact the developers if you"
echo "need this..."
else
echo "Building/using oomph-lib's own copy of the tetgen library"
fi
#Tell everybody about it...
AM_CONDITIONAL(SUPPRESS_TETGEN_LIB, test x$suppress_tetgen = xtrue)
# Add flag
if test x$suppress_tetgen = xfalse; then \
accumulated_cpp_flags=`echo $accumulated_cpp_flags " -DOOMPH_HAS_TETGEN_LIB"`; \
fi;
#----------------------------------------------------------------
# Allow automatic specification of metis by compiler/linker
# (e.g. for Hector)
#----------------------------------------------------------------
have_metis=false
AC_ARG_ENABLE(suppress-oomph-metis,
[ --enable-suppress-oomph-metis Supress building of oomph-lib's
own copy of metis. The library
is then assumed to be provided automatically
by the compiler/linker.],
[have_metis=true],
[have_metis=false])
if test x$have_metis = xtrue; then
echo "Assuming that metis is provided automatically by compiler/linker"
else
echo "Building/using oomph-lib's own copy of metis"
fi
#Tell everybody about it...
AM_CONDITIONAL(ALREADY_HAVE_METIS, test x$have_metis = xtrue)
#----------------------------------------------------------------
# Allow automatic specification of parmetis by compiler/linker
# (e.g. for Hector)
#----------------------------------------------------------------
have_parmetis=false
AC_ARG_ENABLE(suppress-oomph-parmetis,
[ --enable-suppress-oomph-parmetis Supress building of oomph-lib's
own copy of parmetis. The library
is then assumed to be provided automatically
by the compiler/linker.],
[have_parmetis=true],
[have_parmetis=false])
if test x$have_parmetis = xtrue; then
echo "Assuming that parmetis is provided automatically by compiler/linker"
else
echo "Building/using oomph-lib's own copy of parmetis"
fi
#Tell everybody about it...
AM_CONDITIONAL(ALREADY_HAVE_PARMETIS, test x$have_parmetis = xtrue)
#----------------------------------------------------------------
# Allow automatic specification of superlu by compiler/linker
# (e.g. for Hector)
#----------------------------------------------------------------
have_superlu=false
AC_ARG_ENABLE(suppress-oomph-superlu,
[ --enable-suppress-oomph-superlu Supress building of oomph-lib's
own copy of serial SuperLU. The library
is then assumed to be provided automatically
by the compiler/linker.],
[have_superlu=true],
[have_superlu=false])
if test x$have_superlu = xtrue; then
echo "Assuming that SuperLU is provided automatically by compiler/linker"
else
echo "Building/using oomph-lib's own copy of SuperLU"
accumulated_cpp_flags=`echo $accumulated_cpp_flags " -DUSING_OOMPH_SUPERLU"`; \
fi
#Tell everybody about it...
AM_CONDITIONAL(ALREADY_HAVE_SUPERLU, test x$have_superlu = xtrue)
#----------------------------------------------------------------
# Allow automatic specification of superlu_dist by compiler/linker
# (e.g. for Hector)
#----------------------------------------------------------------
have_superlu_dist=false
AC_ARG_ENABLE(suppress-oomph-superlu_dist,
[ --enable-suppress-oomph-superlu_dist Supress building of oomph-lib's
own copy of serial SuperLU_dist. The library
is then assumed to be provided automatically
by the compiler/linker.],
[have_superlu_dist=true],
[have_superlu_dist=false])
if test x$have_superlu_dist = xtrue; then
echo "Assuming that SuperLU_dist is provided automatically by compiler/linker"
else
echo "Building/using oomph-lib's own copy of SuperLU_dist"
accumulated_cpp_flags=`echo $accumulated_cpp_flags " -DUSING_OOMPH_SUPERLU_DIST"`; \
fi
#Tell everybody about it...
AM_CONDITIONAL(ALREADY_HAVE_SUPERLU_DIST, test x$have_superlu_dist = xtrue)
#................................................................
#................................................................
#---------------------------------------------------
# Potential location of HYPRE libraries.
#
# If the HYPRE is available on
# your machine, specify the library directory
# i.e. the one above the lib and include directories
# with --with-hypre
#----------------------------------------------------
HYPRE_DIR=
HYPRE_LIB=
HYPRE_INCLUDE=
check_for_hypre=false
AC_ARG_WITH(hypre,
[ --with-hypre[=DIR] use hypre library in directory DIR
i.e. library is in DIR/lib
and include files are in DIR/include
or specify "auto" (without quotation marks!)
if the library is specified automatically
by your compiler/linker],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_hypre=true
HYPRE_DIR=$withval
HYPRE_LIB="$withval/lib"
HYPRE_INCLUDE="$withval/include"
fi
])
# Has it already been built?
hypre_has_already_been_built=false;
# Do they exist?
have_hypre=false
if test x$check_for_hypre = xtrue; then \
if test -d $HYPRE_LIB; then \
have_hypre=true; \
echo "Found the hypre libraries in"; \
echo " "; \
echo " " $HYPRE_LIB ; \
echo " "; \
else \
if test "$HYPRE_DIR" == "auto"; then \
have_hypre=true; \
echo "Will assume that hypre library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_hypre=false; \
echo "Did NOT find the hypre libraries in"; \
echo " "; \
echo " " $HYPRE_LIB ; \
echo " "; \
fi;\
fi; \
if test -d $HYPRE_INCLUDE; then \
have_hypre=true; \
echo "Found the hypre include files in"; \
echo " "; \
echo " " $HYPRE_INCLUDE ; \
echo " "; \
else \
if test "$HYPRE_DIR" == "auto"; then \
have_hypre=true; \
echo "Will assume that hypre library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_hypre=false; \
echo "Did NOT find the hypre include files in"; \
echo " "; \
echo " " $HYPRE_INCLUDE ; \
echo " "; \
fi; \
fi; \
hypre_has_already_been_built=$have_hypre; \
else \
echo "No hypre library directory specified"; \
# Will hypre library be built?
#-----------------------------
AC_CHECK_FILES(external_distributions/hypre/hypre-2.0.0.tar.gz,
echo "Found hypre-2.0.0.tar.gz --> will build hypre library"; will_have_hypre=true,
echo "Not found hypre-2.0.0.tar.gz --> will not build hypre library"; will_have_hypre=false)
if test x$will_have_hypre = xtrue; then \
have_hypre=true; \
HYPRE_DIR="`pwd`/external_distributions/hypre/hypre_default_installation"
HYPRE_LIB="`pwd`/external_distributions/hypre/hypre_default_installation/lib"
HYPRE_INCLUDE="`pwd`/external_distributions/hypre/hypre_default_installation/include"
fi;
fi
# Do we have the hypre libraries? If so add them to the
#------------------------------------------------------
# external distributions; if not wipe the variables
#--------------------------------------------------
if test x$have_hypre = xfalse; then
HYPRE_LIB='' ; \
HYPRE_INCLUDE='' ;\
else \
if test "$HYPRE_DIR" == "auto"; then \
HYPRE_LIB='' ; \
HYPRE_INCLUDE='' ;\
external_dist_libraries_include=`echo $external_dist_libraries_include " -DOOMPH_HAS_HYPRE"` ; \
else \
external_dist_libraries=`echo $external_dist_libraries " -lHYPRE"` ; \
external_dist_libraries_lib=`echo $external_dist_libraries_lib "-L"$HYPRE_LIB -Wl,-rpath,$HYPRE_LIB` ; \
external_dist_libraries_include=`echo $external_dist_libraries_include "-isystem "$HYPRE_INCLUDE -DOOMPH_HAS_HYPRE` ; \
fi
fi
# Indicate that Trilinos has already been built (so we don't bother trying# to install
# it again if there's a tar file available!)
AM_CONDITIONAL(ALREADY_HAVE_BUILT_HYPRE, test x$hypre_has_already_been_built = xtrue)
#Tell everybody about it...
AM_CONDITIONAL(OOMPH_HAS_HYPRE, test x$have_hypre = xtrue)
# Make thes variables available to all Makefile.am-s
AC_SUBST(HYPRE_LIB)
AC_SUBST(HYPRE_INCLUDE)
#................................................................
#---------------------------------------------------
# Potential location of the TRILINOS libraries.
#
# If the TRILINOS is available on
# your machine, specify the library directory
# i.e. the one above the lib and include directories
# with --with-trilinos
#----------------------------------------------------
TRILINOS_DIR=
TRILINOS_LIB=
TRILINOS_INCLUDE=
check_for_trilinos=false
AC_ARG_WITH(trilinos,
[ --with-trilinos[=DIR] use trilinos library in directory DIR
i.e. library is in DIR/lib
and include files are in DIR/include
or specify "auto" (without quotation marks!)
if the library is specified automatically
by your compiler/linker],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_trilinos=true
TRILINOS_DIR=$withval
TRILINOS_LIB="$withval/lib"
TRILINOS_INCLUDE="$withval/include"
fi
])
# Has Trilinos already been built? Assume it hasn't...
trilinos_has_already_been_built=false;
# Do they exist?
have_trilinos=false
if test x$check_for_trilinos = xtrue; then \
if test -d $TRILINOS_LIB; then \
have_trilinos=true; \
trilinos_has_already_been_built=true; \
echo "Found the trilinos libraries in"; \
echo " "; \
echo " " $TRILINOS_LIB ; \
echo " "; \
else \
if test "$TRILINOS_DIR" == "auto"; then \
have_trilinos=true; \
trilinos_has_already_been_built=true; \
echo "Will assume that trilinos library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_trilinos=false; \
trilinos_has_already_been_built=false; \
echo "Did NOT find the trilinos libraries in"; \
echo " "; \
echo " " $TRILINOS_LIB ; \
echo " "; \
fi;\
fi; \
if test -d $TRILINOS_INCLUDE; then \
have_trilinos=true; \
trilinos_has_already_been_built=true; \
echo "Found the trilinos include files in"; \
echo " "; \
echo " " $TRILINOS_INCLUDE ; \
echo " "; \
else \
if test "$TRILINOS_DIR" == "auto"; then \
have_trilinos=true; \
trilinos_has_already_been_built=true; \
echo "Will assume that trilinos library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_trilinos=false; \
trilinos_has_already_been_built=false; \
echo "Did NOT find the trilinos include files in"; \
echo " "; \
echo " " $TRILINOS_INCLUDE ; \
echo " "; \
fi;\
fi; \
echo ""; \
echo ""; \
echo "========================================================================"; \
echo ""; \
echo "NOTE: We're going to link against an existing trilinos installation."; \
echo " Unfortunately different versions of that library require"; \
echo " explicit linking against different sets of (sub-)libraries."; \
echo " If your version of Trilinos is greater than 10.8.5 then we're"; \
echo " going to assume that you have multiple teuchos libraries, not just"; \
echo " a single teuchos library, i.e. -lteuchos. This is the earliest";
echo " version that we know of that has multiple teuchos libraries. If "; \
echo " your version of Trilinos is older than that but still has multiple"; \
echo " teuchos then you may still have linking problems that indicate"; \
echo " missing teuchos functions. In this case, try to re-install oomph-lib"; \
echo " with the"; \
echo ""; \
echo " --enable_multiple_teuchos_libraries "; \
echo ""; \
echo " configuration flag."; \
echo ""; \
echo "========================================================================"; \
echo ""; \
echo ""; \
echo ""; \
else \
echo "No trilinos library directory specified"; \
TRILINOS_DEFAULT_DIR="`pwd`/external_distributions/trilinos/trilinos_default_installation"
TRILINOS_DEFAULT_LIB="`pwd`/external_distributions/trilinos/trilinos_default_installation/lib"
TRILINOS_DEFAULT_INCLUDE="`pwd`/external_distributions/trilinos/trilinos_default_installation/include"
# Does the default library folder exist?
#---------------------------------------
if test -d $TRILINOS_DEFAULT_LIB; then \
have_trilinos=true; \
trilinos_has_already_been_built=true; \
echo "Found the trilinos libraries in default location: "; \
echo " "; \
echo " " $TRILINOS_DEFAULT_LIB ; \
echo " "; \
TRILINOS_DIR=$TRILINOS_DEFAULT_DIR; \
TRILINOS_LIB=$TRILINOS_DEFAULT_LIB; \
TRILINOS_INCLUDE=$TRILINOS_DEFAULT_INCLUDE; \
if test -d $TRILINOS_INCLUDE; then \
have_trilinos=true; \
trilinos_has_already_been_built=true; \
echo "Found the trilinos include files in"; \
echo " "; \
echo " " $TRILINOS_INCLUDE ; \
echo " "; \
else \
have_trilinos=false; \
trilinos_has_already_been_built=true; \
echo "Did NOT find the trilinos include files in"; \
echo " "; \
echo " " $TRILINOS_INCLUDE ; \
echo " "; \
fi; \
else \
# Will trilinos library be built?
#--------------------------------
will_have_trilinos=false;
AC_CHECK_FILES([external_distributions/trilinos/trilinos-9.0.2.tar.gz external_distributions/trilinos/trilinos-10.8.5-Source.tar.gz external_distributions/trilinos/trilinos-11.4.3-Source.tar.gz external_distributions/trilinos/trilinos-11.8.1-Source.tar.gz], will_have_trilinos=true, )
if test x$will_have_trilinos = xtrue; then \
echo "Trilinos distribution .tar.gz file found ... will build trilinos"; \
have_trilinos=true; \
TRILINOS_DIR="`pwd`/external_distributions/trilinos/trilinos_default_installation"
TRILINOS_LIB="`pwd`/external_distributions/trilinos/trilinos_default_installation/lib"
TRILINOS_INCLUDE="`pwd`/external_distributions/trilinos/trilinos_default_installation/include"
tar_file_needs_single_teuchos_library=false;
AC_CHECK_FILES([external_distributions/trilinos/trilinos-9.0.2.tar.gz external_distributions/trilinos/trilinos-10.8.5-Source.tar.gz], tar_file_needs_single_teuchos_library=true, )
if test x$tar_file_needs_single_teuchos_library = xtrue; then \
echo "We believe that this version of the trilinos library needs single teuchos library"; \
else \
echo "We believe that this version of the trilinos library needs multiple teuchos libraries"; \
fi; \
else \
echo "Trilinos distribution .tar.gz file not found ... can't build trilinos"; \
fi; \
fi; \
fi
# Using multiple techos libraries?
#---------------------------------
use_single_teuchos_library=true;
# PM: Do we have a single Teuchos library? Placed here because if we
# find that the library has *already been installed* in the default
# location then we need to check what version it is.
version_file=$TRILINOS_INCLUDE/Trilinos_version.h;
if test x$have_trilinos = xtrue; then \
if test -e $TRILINOS_INCLUDE; then \
trilinos_version_number=`grep TRILINOS_MAJOR_MINOR_VERSION $version_file | awk -F' ' '{print $3}'`; \
else \
# If we're here then we don't have Trilinos unpacked yet however I can sneak into the tar
# file without unpacking it (using zgrep) to get the version number...
echo "I don't know what your Trilinos tar file is explicitly but I'm going to assume you only have one of them!"; \
trilinos_directory_check="`pwd`/external_distributions/trilinos/"; \
trilinos_version_number=`zgrep -a Trilinos_MAJOR_MINOR_VERSION "$trilinos_directory_check"trilinos*.tar.gz | sed 's/)//g' | cut -d' ' -f 2`; \
echo "I managed to search through your tarred file and I found the version number."; \
fi; \
echo "Library version number is: "$trilinos_version_number; \
if test "$trilinos_version_number" -gt 100805; then \
multiple_teuchos_libs_requested=true; \
echo "The version number is greater than 10.8.5. Therefore requesting multiple teuchos libraries!"; \
fi; \
fi;
# If the user asked to make sure we assume multiple teuches libraries
if test x$multiple_teuchos_libs_requested = xtrue; then \
echo "Requested multiple teuchos libraries via config flag"; \
use_single_teuchos_library=false; \
if test x$will_have_trilinos = xtrue; then \
if test x$tar_file_needs_single_teuchos_library = xtrue; then \
echo "Note that this changes the (sensible!) default inferred from version of tar file!"; \
fi; \
fi; \
else \
echo "Not requested multiple teuchos library via config flag"; \
if test x$will_have_trilinos = xtrue; then \
if test x$tar_file_needs_single_teuchos_library = xtrue; then \
echo "Building with single teuchos library"; \
use_single_teuchos_library=true; \
else
echo "Building with multi teuchos libraries"; \
use_single_teuchos_library=false; \
fi; \
fi; \
fi;
# Do we have the trilinos libraries? If so add them to the
#---------------------------------------------------------
# external distributions; if not wipe the variables
#--------------------------------------------------
if test x$have_trilinos = xfalse; then
TRILINOS_LIB='' ; \
TRILINOS_INCLUDE='' ;\
else \
if test "$TRILINOS_DIR" == "auto"; then \
TRILINOS_LIB='' ; \
TRILINOS_INCLUDE='' ;\
external_dist_libraries_include=`echo $external_dist_libraries_include " -DOOMPH_HAS_TRILINOS"` ; \
else \
if test x$use_single_teuchos_library = xtrue; then \
echo "Actually building with single teuchos library"; \
external_dist_libraries=`echo $external_dist_libraries " -lml -lifpack -lamesos -lanasazi -laztecoo -lepetraext -ltriutils -lepetra -lteuchos"` ; \
else \
echo "Actually building with multiple teuchos libraries"; \
external_dist_libraries=`echo $external_dist_libraries " -lml -lifpack -lamesos -lanasazi -laztecoo -lepetraext -ltriutils -lepetra -lteuchosremainder -lteuchosnumerics -lteuchoscomm -lteuchosparameterlist -lteuchoscore "` ; \
fi
external_dist_libraries_lib=`echo $external_dist_libraries_lib "-L"$TRILINOS_LIB` ; \
if test x$dynamic_linking_for_trilinos_requested = xtrue; then \
external_dist_libraries_lib=`echo $external_dist_libraries_lib -Wl,-rpath,$TRILINOS_LIB` ; \
fi; \
external_dist_libraries_include=`echo $external_dist_libraries_include "-isystem "$TRILINOS_INCLUDE -DOOMPH_HAS_TRILINOS` ; \
fi
fi
# Indicate that Trilinos has already been built (so we don't bother trying# to install
# it again if there's a tar file available!)
AM_CONDITIONAL(ALREADY_HAVE_BUILT_TRILINOS, test x$trilinos_has_already_been_built = xtrue)
# Indicate that this build of oomph-lib will have Trilinos installed (which means it
# already has access to a built version or it will get built through the autogen process)
AM_CONDITIONAL(OOMPH_HAS_TRILINOS, test x$have_trilinos = xtrue)
# Make these variables available to all Makefile.am-s
AC_SUBST(TRILINOS_LIB)
AC_SUBST(TRILINOS_INCLUDE)
#................................................................
#---------------------------------------------------
# Potential location of the HLIB libraries.
#
# If the HLIB is available on your machine, specify the library directory
# i.e. the one above the lib and include directories with --with-hlib
#----------------------------------------------------
HLIB_LIB=
HLIB_INCLUDE=
check_for_hlib=false
AC_ARG_WITH(hlib,
[AS_HELP_STRING([--with-hlib], [Use hlib library. Assumed to be installed in the default install
directorys: headers in /usr/local/include/HLib and library in
/usr/local/lib.])]
,[
check_for_hlib=true
HLIB_LIB="/usr/local/lib"
HLIB_INCLUDE="/usr/local/include/HLib"
])
# Do they exist?
have_hlib=false
if test x$check_for_hlib = xtrue; then \
if test -d $HLIB_LIB; then \
have_hlib=true; \
echo "Found the hlib libraries in"; \
echo " "; \
echo " " $HLIB_LIB ; \
echo " "; \
else \
have_hlib=false; \
echo "Did NOT find the hlib libraries in"; \
echo " "; \
echo " " $HLIB_LIB ; \
echo " "; \
fi; \
if test -d $HLIB_INCLUDE; then \
have_hlib=true; \
echo "Found the hlib include files in"; \
echo " "; \
echo " " $HLIB_INCLUDE ; \
echo " "; \
else \
have_hlib=false; \
echo "Did NOT find the hlib include files in"; \
echo " "; \
echo " " $HLIB_INCLUDE ; \
echo " "; \
fi; \
else \
echo "No hlib library directory specified"; \
dnl dnl Not building hlib for people at the moment, probably not worth it
dnl # Will hlib library be built?
dnl #--------------------------------
dnl will_have_hlib=false;
dnl AC_CHECK_FILES([external_distributions/hlib/HLib-1.3p20.tar.gz], will_have_hlib=true, )
dnl if test x$will_have_hlib = xtrue; then \
dnl echo "Hlib distribution .tar.gz file found ... will build hlib"; \
dnl have_hlib=true; \
dnl HLIB_DIR="`pwd`/external_distributions/hlib/hlib_default_installation"
dnl HLIB_LIB="`pwd`/external_distributions/hlib/hlib_default_installation/lib"
dnl HLIB_INCLUDE="`pwd`/external_distributions/hlib/hlib_default_installation/include"
dnl else
dnl echo "Hlib distribution .tar.gz file not found ... can't build hlib";
dnl fi;
fi
# Do we have the hlib libraries? If so add them to the external
# distributions; if not wipe the variables
#--------------------------------------------------
if test x$have_hlib = xfalse; then
HLIB_LIB='' ; \
HLIB_INCLUDE='' ;\
else \
external_dist_libraries=`echo $external_dist_libraries " -lhmatrix"` ; \
external_dist_libraries_lib=`echo $external_dist_libraries_lib "-L"$HLIB_LIB` ; \
external_dist_libraries_include=`echo $external_dist_libraries_include "-I"$HLIB_INCLUDE -DOOMPH_HAS_HLIB` ; \
fi
#Tell everybody about it...
AM_CONDITIONAL(OOMPH_HAS_HLIB, test x$have_hlib = xtrue)
# Make these variables available to all Makefile.am-s
AC_SUBST(HLIB_LIB)
AC_SUBST(HLIB_INCLUDE)
#................................................................
#................................................................
# Will mumps and scalapack be built?
#-----------------------------------
will_build_mumps_and_scalapack=false;
# Initialise test if all the specified libraries are available;
# gets switched to true when the first one (for scalapack) passes;
# then reset to false if/when any of the subsequent ones fail
all_specifiable_mumps_etc_libraries_available=false;
mpi_include_dir=
# Specify the mpi include directory that contains mpi.h
AC_ARG_WITH(mpi-include-directory,
[ --with-mpi-include-directory[=MPI_INCLUDE_DIRECTORY] specify mpi include
directory that contains mpi.h. Needed for scalapack
build.],[
if test "$withval" != "no" -a "$withval" != "yes"; then
mpi_include_dir=$withval
have_mpi_include_directory=true
MPI_INCLUDE_DIRECTORY=$withval
fi
])
AC_SUBST(MPI_INCLUDE_DIRECTORY)
if test x$have_mpi_include_directory = xfalse; then \
echo "Nobody has specified mpi include directory (the directory"; \
echo "that contains mpi.h) with --with-mpi-include-directory"; \
echo "therefore I cannot do mumps/scalapack build from source"; \
else \
echo "mpi include directory (the directory that contains mpi.h) "; \
echo "has been specified with --with-mpi-include-directory"; \
echo "therefore I can do mumps/scalapack build from source"; \
fi;
AC_CHECK_FILES($mpi_include_dir/mpi.h,
echo "Found mpi.h for scalapack build";
found_mpi_h_file=true,
echo "Not found mpi.h for scalapack build";
found_mpi_h_file=false)
if test x$found_mpi_h_file = xfalse; then \
echo "Did not find mpi.h in $mpi_include_dir for scalapack build"; \
fi;
AC_CHECK_FILES(external_distributions/mumps_and_scalapack/MUMPS_4.10.0.tar.gz,
echo "Found MUMPS_4.10.0.tar.gz";
found_mumps_tar_file=true,
echo "Not found MUMPS_4.10.0.tar.gz";
found_mumps_tar_file=false)
AC_CHECK_FILES(external_distributions/mumps_and_scalapack/scalapack_installer.tgz,
echo "Found scalapack_installer.tgz";
found_scalapack_tar_file=true,
echo "Not found scalapack_installer.tgz";
found_scalapack_tar_file=false)
if test x$found_mumps_tar_file = xtrue; then \
if test x$found_scalapack_tar_file = xfalse; then \
echo "Need external_distributions/mumps_and_scalapack/MUMPS_4.10.0.tar.gz *and* "; \
echo "external_distributions/mumps_and_scalapack/scalapack_installer.tgz "; \
echo "to build mumps"; \
fi \
fi;
if test x$found_mumps_tar_file = xfalse; then \
if test x$found_scalapack_tar_file = xtrue; then \
echo "Need external_distributions/mumps_and_scalapack/MUMPS_4.10.0.tar.gz *and* "; \
echo "external_distributions/mumps_and_scalapack/scalapack_installer.tgz "; \
echo "to build mumps"; \
fi \
fi;
if test x$found_mpi_h_file = xfalse; then \
echo "Not doing mumps/scalapack build because location of mpi.h file not specified"; \
will_build_mumps_and_scalapack=false; \
else \
if test x$found_mumps_tar_file = xtrue; then \
if test x$found_scalapack_tar_file = xtrue; then \
if test x$want_mpi = xfalse; then \
echo "Currently I can only build mumps/scalapack with mpi support"; \
will_build_mumps_and_scalapack=false; \
else \
echo "Will build mumps/scalapack with mpi support"; \
will_build_mumps_and_scalapack=true; \
MUMPS_AND_SCALAPACK_DIR="`pwd`/external_distributions/mumps_and_scalapack/mumps_and_scalapack_default_installation"
MUMPS_AND_SCALAPACK_LIB="`pwd`/external_distributions/mumps_and_scalapack/mumps_and_scalapack_default_installation/lib"
MUMPS_AND_SCALAPACK_INCLUDE="`pwd`/external_distributions/mumps_and_scalapack/mumps_and_scalapack_default_installation/include"
fi \
fi \
fi \
fi;
# Make thes variables available to all Makefile.am-s
AC_SUBST(MUMPS_AND_SCALAPACK_LIB)
AC_SUBST(MUMPS_AND_SCALAPACK_INCLUDE)
#................................................................
#................................................................
#---------------------------------------------------
# Potential location for the scalapack libraries.
#
# If the complete scalapack library is available on
# your machine, specify the absolute path to the
# library with --with-scalapack
#----------------------------------------------------
SCALAPACK_LIB=
check_for_scalapack=false
AC_ARG_WITH(scalapack,
[ --with-scalapack[=ABSOLUTE_PATH] use scalapack library specified via ABSOLUTE PATH
e.g. /usr/local/lib/scalapack.a],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_scalapack=true
SCALAPACK_LIB=$withval
fi
])
# Do they exist?
have_scalapack=false
if test x$check_for_scalapack = xtrue; then \
if test -e $SCALAPACK_LIB; then \
have_scalapack=true; \
echo "Found the scalapack library "; \
echo " "; \
echo " " $SCALAPACK_LIB ; \
echo " "; \
# Make the variable available to all Makefile.am-s
AC_SUBST(SCALAPACK_LIB)
# This switches it to true because this test goes first!
all_specifiable_mumps_etc_libraries_available=true;
else \
have_scalapack=false; \
echo "Did NOT find the scalapack library"; \
echo " "; \
echo " " $SCALAPACK_LIB ; \
echo " "; \
all_specifiable_mumps_etc_libraries_available=false; \
fi; \
else \
echo "No scalapack library specified"; \
if test x$will_build_mumps_and_scalapack = xtrue; then \
echo "...but building it from source"; \
SCALAPACK_LIB=$MUMPS_AND_SCALAPACK_LIB/libscalapack.a ; \
echo "after which it will be: " $SCALAPACK_LIB ; \
AC_SUBST(SCALAPACK_LIB) \
have_scalapack=true; \
fi; \
all_specifiable_mumps_etc_libraries_available=false; \
fi
#Tell everybody about it...
AM_CONDITIONAL(ALREADY_HAVE_SCALAPACK, test x$have_scalapack = xtrue)
#................................................................
#................................................................
#---------------------------------------------------
# Potential location for the blacs libraries
#
# If the complete blacs library is available on
# your machine, specify the absolute path to the
# library directory (!) with --with-blacs
#----------------------------------------------------
BLACS_LIB=
check_for_blacs=false
AC_ARG_WITH(blacs,
[ --with-blacs[=ABSOLUTE_PATH] ABSOLUTE PATH to blacs libraries
e.g. /usr/local/lib/ [with trailing forward slash!]
This specified directory must contain
the files blacs.a blacsF77.a and blacs_copy.a
the latter being a copy of blacs.a.],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_blacs=true
BLACS_LIB=$withval
fi
])
# Do they exist?
have_blacs=false
if test x$check_for_blacs = xtrue; then \
if test -e $BLACS_LIB; then \
have_blacs=true; \
echo "Found the blacs library "; \
echo " "; \
echo " " $BLACS_LIB ; \
echo " "; \
# Make the variable available to all Makefile.am-s
AC_SUBST(BLACS_LIB)
else \
have_blacs=false; \
echo "Did NOT find the blacs library"; \
echo " "; \
echo " " $BLACS_LIB ; \
echo " "; \
all_specifiable_mumps_etc_libraries_available=false; \
fi; \
else \
echo "No blacs library specified"; \
if test x$will_build_mumps_and_scalapack = xtrue; then \
echo "...but building it from source"; \
BLACS_LIB=$MUMPS_AND_SCALAPACK_LIB ; \
echo "after which it will be: " $BLACS_LIB ; \
AC_SUBST(BLACS_LIB) \
have_blacs=true; \
fi; \
all_specifiable_mumps_etc_libraries_available=false; \
fi
#Tell everybody about it...
AM_CONDITIONAL(ALREADY_HAVE_BLACS, test x$have_blacs = xtrue)
#................................................................
#................................................................
#---------------------------------------------------
# Potential location for the pord library
#
# If the complete pord library is available on
# your machine, specify the absolute path to the
# library with --with-pord
#----------------------------------------------------
PORD_LIB=
check_for_pord=false
AC_ARG_WITH(pord,
[ --with-pord[=ABSOLUTE_PATH] ABSOLUTE PATH to pord libraries
e.g. /usr/local/lib/libpord.a ],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_pord=true
PORD_LIB=$withval
fi
])
# Do they exist?
have_pord=false
if test x$check_for_pord = xtrue; then \
if test -e $PORD_LIB; then \
have_pord=true; \
echo "Found the pord library "; \
echo " "; \
echo " " $PORD_LIB ; \
echo " "; \
# Make the variable available to all Makefile.am-s
AC_SUBST(PORD_LIB)
else \
have_pord=false; \
echo "Did NOT find the pord library"; \
echo " "; \
echo " " $PORD_LIB ; \
echo " "; \
all_specifiable_mumps_etc_libraries_available=false; \
fi; \
else \
echo "No pord library specified"; \
if test x$will_build_mumps_and_scalapack = xtrue; then \
echo "...but building it from source"; \
PORD_LIB=$MUMPS_AND_SCALAPACK_LIB/libpord.a ; \
echo "after which it will be: " $PORD_LIB ; \
AC_SUBST(PORD_LIB) \
have_pord=true; \
fi; \
all_specifiable_mumps_etc_libraries_available=false; \
fi
#Tell everybody about it...
AM_CONDITIONAL(ALREADY_HAVE_PORD, test x$have_pord = xtrue)
#................................................................
#................................................................
#---------------------------------------------------
# Potential location of the MUMPS libraries.
#
# If the MUMPS is available on
# your machine, specify the library directory
# i.e. the one above the lib and include directories
# with --with-mumps
#----------------------------------------------------
MUMPS_DIR=
MUMPS_LIB=
MUMPS_INCLUDE=
check_for_mumps=false
AC_ARG_WITH(mumps,
[ --with-mumps[=DIR] use mumps library in directory DIR
i.e. library is in DIR/lib
and include files are in DIR/include
or specify "auto" (without quotation marks!)
if the library is specified automatically
by your compiler/linker],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_mumps=true
MUMPS_DIR=$withval
MUMPS_LIB="$withval/lib"
MUMPS_INCLUDE="$withval/include"
fi
])
# Do they exist?
have_mumps=false
if test x$check_for_mumps = xtrue; then \
if test -d $MUMPS_LIB; then \
have_mumps=true; \
echo "Found the mumps libraries in"; \
echo " "; \
echo " " $MUMPS_LIB ; \
echo " "; \
else \
if test "$MUMPS_DIR" == "auto"; then \
have_mumps=true; \
echo "Will assume that mumps library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_mumps=false; \
echo "Did NOT find the mumps libraries in"; \
echo " "; \
echo " " $MUMPS_LIB ; \
echo " "; \
all_specifiable_mumps_etc_libraries_available=false; \
fi; \
fi; \
if test -d $MUMPS_INCLUDE; then \
have_mumps=true; \
echo "Found the mumps include files in"; \
echo " "; \
echo " " $MUMPS_INCLUDE ; \
echo " "; \
else \
if test "$MUMPS_DIR" == "auto"; then \
have_mumps=true; \
echo "Will assume that mumps library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_mumps=false; \
echo "Did NOT find the mumps include files in"; \
echo " "; \
echo " " $MUMPS_INCLUDE ; \
echo " "; \
all_specifiable_mumps_etc_libraries_available=false; \
fi; \
fi; \
else \
echo "No mumps library directory specified"; \
if test x$will_build_mumps_and_scalapack = xtrue; then \
echo "...but building it from source"; \
MUMPS_DIR=$MUMPS_AND_SCALAPACK_DIR ; \
MUMPS_LIB=$MUMPS_AND_SCALAPACK_LIB ; \
MUMPS_INCLUDE=$MUMPS_AND_SCALAPACK_INCLUDE ; \
echo "after which it will be: " $MUMPS_DIR ; \
have_mumps=true; \
fi; \
all_specifiable_mumps_etc_libraries_available=false; \
fi
if test x$all_specifiable_mumps_etc_libraries_available = xfalse; then \
if test x$will_build_mumps_and_scalapack = xfalse; then \
echo " "; \
echo "====================================================================";\
echo "Trouble: I don't have the tar files needed to build mumps";\
echo " and the associated libraries, but you haven't (correctly? ";\
echo " specified all the required library locations with the";\
echo " " ;\
echo " --with-scalapack";\
echo " --with-blacs";\
echo " --with-pord";\
echo " --with-mumps";\
echo " ";\
echo " flags in the configure options file.";\
echo " To stop stuff from breaking, I'll tell oomph-lib that";\
echo " we don't have mumps at all (though the existing";\
echo " will still be listed (but this should be harmless).";\
echo "=====================================================================";\
have_mumps=false;
fi; \
fi
# Do we have the mumps libraries? If so add them to the
#---------------------------------------------------------
# external distributions; if not wipe the variables
#--------------------------------------------------
# Note: for some reason we can't use -isystem (rather than -I) to include
# MUMPS libraries without showing warnings.
if test x$have_mumps = xfalse; then
MUMPS_LIB='' ; \
MUMPS_INCLUDE='' ;\
else \
if test "$MUMPS_DIR" == "auto"; then \
MUMPS_LIB='' ; \
MUMPS_INCLUDE='' ;\
external_dist_libraries_include=`echo $external_dist_libraries_include " -DOOMPH_HAS_MUMPS"` ; \
else \
external_dist_libraries=`echo $external_dist_libraries " -ldmumps -lmumps_common "` ; \
external_dist_libraries_lib=`echo $external_dist_libraries_lib "-L"$MUMPS_LIB` ; \
external_dist_libraries_include=`echo $external_dist_libraries_include "-I"$MUMPS_INCLUDE -DOOMPH_HAS_MUMPS` ; \
fi
fi
#Tell everybody about it...
AM_CONDITIONAL(OOMPH_HAS_MUMPS, test x$have_mumps = xtrue)
# Make these variables available to all Makefile.am-s
AC_SUBST(MUMPS_LIB)
AC_SUBST(MUMPS_INCLUDE)
# If we have mumps and associated libraries available (pre-installed; don't rebuild even
# if we have the tar files!
echo "all_specifiable_mumps_etc_libraries_available " $all_specifiable_mumps_etc_libraries_available
if test x$all_specifiable_mumps_etc_libraries_available = xfalse; then \
echo "Possibly rebuilding mumps etc. libraries (if there's a tar file)"; \
else \
echo "Already have mumps etc libraries built elsewhere so not doing it again"; \
will_build_mumps_and_scalapack=false; \
fi
AM_CONDITIONAL(WILL_BUILD_MUMPS_AND_SCALAPACK, test x$will_build_mumps_and_scalapack = xtrue)
# Make variable available to all Makefile.am-s
AC_SUBST(WILL_BUILD_MUMPS_AND_SCALAPACK)
#................................................................
#................................................................
# Start build cgal and associated third party distributions
#................................................................
#---------------------------------------------------
# Potential location for the boost libraries.
#
# If the BOOST is available on
# your machine, specify the library directory
# i.e. the one above the lib and include directories
# with --with-boost
#----------------------------------------------------
BOOST_DIR=
BOOST_LIB=
BOOST_LIB=
check_for_boost=false
dont_build_boost=false
AC_ARG_WITH(boost,
[ --with-boost[=DIR] use boost library in directory DIR
i.e. library is in DIR/lib
and include files are in DIR/include
or specify "auto" (without quotation marks!)
if the library is specified automatically
by your compiler/linker],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_boost=true
dont_build_boost=true
BOOST_DIR=$withval
BOOST_LIB="$withval/lib"
BOOST_INCLUDE="$withval/include"
fi
])
# Do they exist?
have_boost=false
if test x$check_for_boost = xtrue; then \
if test -d $BOOST_LIB; then \
have_boost=true; \
echo "Found the boost libraries in"; \
echo " "; \
echo " " $BOOST_LIB ; \
echo " "; \
else \
if test "$BOOST_DIR" == "auto"; then \
have_boost=true; \
echo "Will assume that boost library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_boost=false; \
echo "Did NOT find the boost libraries in"; \
echo " "; \
echo " " $BOOST_LIB ; \
echo " "; \
fi;\
fi; \
if test -d $BOOST_INCLUDE; then \
have_boost=true; \
echo "Found the boost include files in"; \
echo " "; \
echo " " $BOOST_INCLUDE ; \
echo " "; \
else \
if test "$BOOST_DIR" == "auto"; then \
have_boost=true; \
echo "Will assume that boost library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_boost=false; \
echo "Did NOT find the boost include files in"; \
echo " "; \
echo " " $BOOST_INCLUDE ; \
echo " "; \
fi; \
fi; \
else \
echo "No boost library directory specified"; \
# Will boost library be built?
#-----------------------------
if test x$want_cgal_build = xtrue; then \
echo "Building boost within oomph-lib as part of cgal build process"; \
will_have_boost=true; \
else \
echo "Not building boost within oomph-lib as part of cgal build process"; \
will_have_boost=false; \
fi; \
if test x$will_have_boost = xtrue; then \
have_boost=true; \
if test x$install_cgal_in_permanent_dir = xtrue; then \
BOOST_DIR="$CGAL_PERMANENT_INSTALLATION_DIR/boost_default_installation";
BOOST_LIB="$CGAL_PERMANENT_INSTALLATION_DIR/boost_default_installation/lib";
BOOST_INCLUDE="$CGAL_PERMANENT_INSTALLATION_DIR/boost_default_installation/include";
else \
BOOST_DIR="`pwd`/external_distributions/boost/boost_default_installation";
BOOST_LIB="`pwd`/external_distributions/boost/boost_default_installation/lib";
BOOST_INCLUDE="`pwd`/external_distributions/boost/boost_default_installation/include";
fi;
echo "BOOST_DIR : " $BOOST_DIR
echo "BOOST_LIB : " $BOOST_LIB
echo "BOOST_INCLUDE: " $BOOST_INCLUDE
fi;
fi
# Do we have the boost libraries? If so add them to the
#------------------------------------------------------
# external distributions; if not wipe the variables
#--------------------------------------------------
if test x$have_boost = xfalse; then
BOOST_LIB='' ; \
BOOST_INCLUDE='' ;\
else \
if test "$BOOST_DIR" == "auto"; then \
BOOST_LIB='' ; \
BOOST_INCLUDE='' ;\
external_dist_libraries_include=`echo $external_dist_libraries_include " -DOOMPH_HAS_BOOST"` ; \
else \
external_dist_libraries=`echo $external_dist_libraries " -lpthread -lboost_thread -lboost_system "` ; \
external_dist_libraries_lib=`echo $external_dist_libraries_lib "-L"$BOOST_LIB -Wl,-rpath,$BOOST_LIB ` ; \
external_dist_libraries_include=`echo $external_dist_libraries_include "-isystem "$BOOST_INCLUDE -DOOMPH_HAS_BOOST` ; \
fi
fi
#Tell everybody about it...
#AM_CONDITIONAL(OOMPH_HAS_BOOST, test x$have_boost = xtrue)
#Tell everybody about it...
AM_CONDITIONAL(DONT_BUILD_BOOST, test x$dont_build_boost = xtrue)
# Make thes variables available to all Makefile.am-s
AC_SUBST(BOOST_LIB)
AC_SUBST(BOOST_INCLUDE)
AC_SUBST(BOOST_DIR)
#................................................................
#................................................................
#---------------------------------------------------
# Potential location for the gmp libraries.
#
# If the GMP is available on
# your machine, specify the library directory
# i.e. the one above the lib and include directories
# with --with-gmp
#----------------------------------------------------
GMP_DIR=
GMP_LIB=
GMP_LIB=
check_for_gmp=false
dont_build_gmp=false
AC_ARG_WITH(gmp,
[ --with-gmp[=DIR] use gmp library in directory DIR
i.e. library is in DIR/lib
and include files are in DIR/include
or specify "auto" (without quotation marks!)
if the library is specified automatically
by your compiler/linker],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_gmp=true
dont_build_gmp=true
GMP_DIR=$withval
GMP_LIB="$withval/lib"
GMP_INCLUDE="$withval/include"
fi
])
# Do they exist?
have_gmp=false
if test x$check_for_gmp = xtrue; then \
if test -d $GMP_LIB; then \
have_gmp=true; \
echo "Found the gmp libraries in"; \
echo " "; \
echo " " $GMP_LIB ; \
echo " "; \
else \
if test "$GMP_DIR" == "auto"; then \
have_gmp=true; \
echo "Will assume that gmp library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_gmp=false; \
echo "Did NOT find the gmp libraries in"; \
echo " "; \
echo " " $GMP_LIB ; \
echo " "; \
fi;\
fi; \
if test -d $GMP_INCLUDE; then \
have_gmp=true; \
echo "Found the gmp include files in"; \
echo " "; \
echo " " $GMP_INCLUDE ; \
echo " "; \
else \
if test "$GMP_DIR" == "auto"; then \
have_gmp=true; \
echo "Will assume that gmp library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_gmp=false; \
echo "Did NOT find the gmp include files in"; \
echo " "; \
echo " " $GMP_INCLUDE ; \
echo " "; \
fi; \
fi; \
else \
echo "No gmp library directory specified"; \
# Will gmp library be built?
#---------------------------
if test x$want_cgal_build = xtrue; then \
echo "Building gmp within oomph-lib as part of cgal build process"; \
will_have_gmp=true; \
else \
echo "Not building gmp within oomph-lib as part of cgal build process"; \
will_have_gmp=false; \
fi; \
if test x$will_have_gmp = xtrue; then \
have_gmp=true; \
if test x$install_cgal_in_permanent_dir = xtrue; then \
GMP_DIR="$CGAL_PERMANENT_INSTALLATION_DIR/gmp_default_installation";
GMP_LIB="$CGAL_PERMANENT_INSTALLATION_DIR/gmp_default_installation/lib";
GMP_INCLUDE="$CGAL_PERMANENT_INSTALLATION_DIR/gmp_default_installation/include";
else \
GMP_DIR="`pwd`/external_distributions/gmp/gmp_default_installation"
GMP_LIB="`pwd`/external_distributions/gmp/gmp_default_installation/lib"
GMP_INCLUDE="`pwd`/external_distributions/gmp/gmp_default_installation/include"
fi;
echo "GMP_DIR : " $GMP_DIR
echo "GMP_LIB : " $GMP_LIB
echo "GMP_INCLUDE: " $GMP_INCLUDE
fi;
fi
# Do we have the gmp libraries? If so add them to the
#------------------------------------------------------
# external distributions; if not wipe the variables
#--------------------------------------------------
if test x$have_gmp = xfalse; then
GMP_LIB='' ; \
GMP_INCLUDE='' ;\
else \
if test "$GMP_DIR" == "auto"; then \
GMP_LIB='' ; \
GMP_INCLUDE='' ;\
external_dist_libraries_include=`echo $external_dist_libraries_include " -DOOMPH_HAS_GMP"` ; \
else \
external_dist_libraries=`echo $external_dist_libraries " -lgmp"` ; \
external_dist_libraries_lib=`echo $external_dist_libraries_lib "-L"$GMP_LIB` ; \
external_dist_libraries_include=`echo $external_dist_libraries_include "-isystem "$GMP_INCLUDE -DOOMPH_HAS_GMP` ; \
fi
fi
#Tell everybody about it...
#AM_CONDITIONAL(OOMPH_HAS_GMP, test x$have_gmp = xtrue)
#Tell everybody about it...
AM_CONDITIONAL(DONT_BUILD_GMP, test x$dont_build_gmp = xtrue)
# Make thes variables available to all Makefile.am-s
AC_SUBST(GMP_LIB)
AC_SUBST(GMP_INCLUDE)
AC_SUBST(GMP_DIR)
#................................................................
#---------------------------------------------------
# Potential location for the mpfr libraries.
#
# If the MPFR is available on
# your machine, specify the library directory
# i.e. the one above the lib and include directories
# with --with-mpfr
#----------------------------------------------------
MPFR_DIR=
MPFR_LIB=
MPFR_LIB=
check_for_mpfr=false
dont_build_mpfr=false
AC_ARG_WITH(mpfr,
[ --with-mpfr[=DIR] use mpfr library in directory DIR
i.e. library is in DIR/lib
and include files are in DIR/include
or specify "auto" (without quotation marks!)
if the library is specified automatically
by your compiler/linker],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_mpfr=true
dont_build_mpfr=true
MPFR_DIR=$withval
MPFR_LIB="$withval/lib"
MPFR_INCLUDE="$withval/include"
fi
])
# Do they exist?
have_mpfr=false
if test x$check_for_mpfr = xtrue; then \
if test -d $MPFR_LIB; then \
have_mpfr=true; \
echo "Found the mpfr libraries in"; \
echo " "; \
echo " " $MPFR_LIB ; \
echo " "; \
else \
if test "$MPFR_DIR" == "auto"; then \
have_mpfr=true; \
echo "Will assume that mpfr library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_mpfr=false; \
echo "Did NOT find the mpfr libraries in"; \
echo " "; \
echo " " $MPFR_LIB ; \
echo " "; \
fi;\
fi; \
if test -d $MPFR_INCLUDE; then \
have_mpfr=true; \
echo "Found the mpfr include files in"; \
echo " "; \
echo " " $MPFR_INCLUDE ; \
echo " "; \
else \
if test "$MPFR_DIR" == "auto"; then \
have_mpfr=true; \
echo "Will assume that mpfr library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_mpfr=false; \
echo "Did NOT find the mpfr include files in"; \
echo " "; \
echo " " $MPFR_INCLUDE ; \
echo " "; \
fi; \
fi; \
else \
echo "No mpfr library directory specified"; \
# Will mpfr library be built?
#----------------------------
if test x$want_cgal_build = xtrue; then \
echo "Building mpfr within oomph-lib as part of cgal build process"; \
will_have_mpfr=true; \
else \
echo "Not building mpfr within oomph-lib as part of cgal build process"; \
will_have_mpfr=false; \
fi; \
if test x$will_have_mpfr = xtrue; then \
have_mpfr=true; \
if test x$install_cgal_in_permanent_dir = xtrue; then \
MPFR_DIR="$CGAL_PERMANENT_INSTALLATION_DIR/mpfr_default_installation";
MPFR_LIB="$CGAL_PERMANENT_INSTALLATION_DIR/mpfr_default_installation/lib";
MPFR_INCLUDE="$CGAL_PERMANENT_INSTALLATION_DIR/mpfr_default_installation/include";
else \
MPFR_DIR="`pwd`/external_distributions/mpfr/mpfr_default_installation"
MPFR_LIB="`pwd`/external_distributions/mpfr/mpfr_default_installation/lib"
MPFR_INCLUDE="`pwd`/external_distributions/mpfr/mpfr_default_installation/include"
fi;
echo "MPFR_DIR : " $MPFR_DIR
echo "MPFR_LIB : " $MPFR_LIB
echo "MPFR_INCLUDE: " $MPFR_INCLUDE
fi;
fi
# Do we have the mpfr libraries? If so add them to the
#------------------------------------------------------
# external distributions; if not wipe the variables
#--------------------------------------------------
if test x$have_mpfr = xfalse; then
MPFR_LIB='' ; \
MPFR_INCLUDE='' ;\
else \
if test "$MPFR_DIR" == "auto"; then \
MPFR_LIB='' ; \
MPFR_INCLUDE='' ;\
external_dist_libraries_include=`echo $external_dist_libraries_include " -DOOMPH_HAS_MPFR"` ; \
else \
external_dist_libraries=`echo $external_dist_libraries " -lmpfr"` ; \
external_dist_libraries_lib=`echo $external_dist_libraries_lib "-L"$MPFR_LIB` ; \
external_dist_libraries_include=`echo $external_dist_libraries_include "-isystem "$MPFR_INCLUDE -DOOMPH_HAS_MPFR` ; \
fi
fi
#Tell everybody about it...
#AM_CONDITIONAL(OOMPH_HAS_MPFR, test x$have_mpfr = xtrue)
#Tell everybody about it...
AM_CONDITIONAL(DONT_BUILD_MPFR, test x$dont_build_mpfr = xtrue)
# Make thes variables available to all Makefile.am-s
AC_SUBST(MPFR_LIB)
AC_SUBST(MPFR_INCLUDE)
AC_SUBST(MPFR_DIR)
#................................................................
#---------------------------------------------------
# Potential location for the cgal libraries.
#
# If the CGAL is available on
# your machine, specify the library directory
# i.e. the one above the lib and include directories
# with --with-cgal
#----------------------------------------------------
CGAL_DIR=
CGAL_LIB=
CGAL_LIB=
check_for_cgal=false
dont_build_cgal=false
AC_ARG_WITH(cgal,
[ --with-cgal[=DIR] use cgal library in directory DIR
i.e. library is in DIR/lib
and include files are in DIR/include
or specify "auto" (without quotation marks!)
if the library is specified automatically
by your compiler/linker],[
if test "$withval" != "no" -a "$withval" != "yes"; then
check_for_cgal=true
dont_build_cgal=true
CGAL_DIR=$withval
CGAL_LIB="$withval/lib"
CGAL_INCLUDE="$withval/include"
fi
])
# Do they exist?
have_cgal=false
if test x$check_for_cgal = xtrue; then \
if test -d $CGAL_LIB; then \
have_cgal=true; \
echo "Found the cgal libraries in"; \
echo " "; \
echo " " $CGAL_LIB ; \
echo " "; \
else \
if test "$CGAL_DIR" == "auto"; then \
have_cgal=true; \
echo "Will assume that cgal library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_cgal=false; \
echo "Did NOT find the cgal libraries in"; \
echo " "; \
echo " " $CGAL_LIB ; \
echo " "; \
fi;\
fi; \
if test -d $CGAL_INCLUDE; then \
have_cgal=true; \
echo "Found the cgal include files in"; \
echo " "; \
echo " " $CGAL_INCLUDE ; \
echo " "; \
else \
if test "$CGAL_DIR" == "auto"; then \
have_cgal=true; \
echo "Will assume that cgal library is specified automatically by"; \
echo "compiler/linker."; \
else \
have_cgal=false; \
echo "Did NOT find the cgal include files in"; \
echo " "; \
echo " " $CGAL_INCLUDE ; \
echo " "; \
fi; \
fi; \
else \
echo "No cgal library directory specified"; \
# Will cgal library be built?
#----------------------------
if test x$want_cgal_build = xtrue; then \
echo "Building cgal within oomph-lib as part of cgal build process"; \
will_have_cgal=true; \
else \
echo "Not building cgal within oomph-lib as part of cgal build process"; \
will_have_cgal=false; \
fi; \
if test x$will_have_cgal = xtrue; then \
have_cgal=true; \
if test x$install_cgal_in_permanent_dir = xtrue; then \
CGAL_DIR="$CGAL_PERMANENT_INSTALLATION_DIR/cgal_default_installation";
CGAL_LIB="$CGAL_PERMANENT_INSTALLATION_DIR/cgal_default_installation/lib";
CGAL_INCLUDE="$CGAL_PERMANENT_INSTALLATION_DIR/cgal_default_installation/include";
else \
CGAL_DIR="`pwd`/external_distributions/cgal/cgal_default_installation"
CGAL_LIB="`pwd`/external_distributions/cgal/cgal_default_installation/lib"
CGAL_INCLUDE="`pwd`/external_distributions/cgal/cgal_default_installation/include"
fi;
echo "CGAL_DIR : " $CGAL_DIR
echo "CGAL_LIB : " $CGAL_LIB
echo "CGAL_INCLUDE: " $CGAL_INCLUDE
fi;
fi
# Do we have the cgal libraries? If so add them to the
#------------------------------------------------------
# external distributions; if not wipe the variables
#--------------------------------------------------
if test x$have_cgal = xfalse; then
CGAL_LIB='' ; \
CGAL_INCLUDE='' ;\
else \
if test "$CGAL_DIR" == "auto"; then \
CGAL_LIB='' ; \
CGAL_INCLUDE='' ;\
external_dist_libraries_include=`echo $external_dist_libraries_include " -DOOMPH_HAS_CGAL"` ; \
else \
external_dist_libraries=`echo $external_dist_libraries " -lCGAL_Core -lCGAL "` ; \
# external_dist_libraries=`echo $external_dist_libraries " -lCGAL_Core -lCGAL_ImageIO -lCGAL "` ; \
external_dist_libraries_lib=`echo $external_dist_libraries_lib "-L"$CGAL_LIB -Wl,-rpath,$CGAL_LIB` ; \
external_dist_libraries_include=`echo $external_dist_libraries_include "-isystem "$CGAL_INCLUDE -DOOMPH_HAS_CGAL` ; \
fi
fi
#Tell everybody about it...
AM_CONDITIONAL(OOMPH_HAS_CGAL, test x$have_cgal = xtrue)
#Tell everybody about it...
AM_CONDITIONAL(DONT_BUILD_CGAL, test x$dont_build_cgal = xtrue)
# Make thes variables available to all Makefile.am-s
AC_SUBST(CGAL_LIB)
AC_SUBST(CGAL_INCLUDE)
AC_SUBST(CGAL_DIR)
#... doc ...
# Do we want to build cgal and associated third party distributions ?
if test x$want_cgal_build = xtrue; then \
if test x$check_for_cgal = xfalse; then \
echo "We're building cgal and associated third party distributions" ; \
fi
else \
echo "Not building cgal and associated third party distributions "; \
echo " "; \
# Install cgal and associated third party distributions in permament
# directory?
if test x$install_cgal_in_permanent_dir = xtrue; then \
echo " "; \
echo "================================================================ "; \
echo "WARNING: Makes no sense to specify cgal install directory"; \
echo " with --with-cgal-permanent-installation-dir when"; \
echo " suppressing cgal build with --enable-suppress-cgal-build"; \
echo " We won't build it (and therefore not install it either)."; \
echo "================================================================ "; \
echo " "; \
fi; \
echo " "; \
fi;
# Install cgal and associated third party distributions in permament
# directory?
if test x$want_cgal_build = xtrue; then \
if test x$install_cgal_in_permanent_dir = xtrue; then \
echo "Installing cgal and associated third party distributions in:" $CGAL_PERMANENT_INSTALLATION_DIR; \
else \
echo "Installing cgal and associated third party distributions within oomph-lib's external_distributions directory. "; \
fi;
fi;
#................................................................
# end cgal build
#................................................................
# Make external libraries with their own distributions available to
#------------------------------------------------------------------
# all Makfile.am-s. Note that by adding to AM_LDFLAGS and AM_CPPFLAGS
#--------------------------------------------------------------------
# everything automatically links against these libraries.
#--------------------------------------------------------
# Also add any other accumulated flags for these variables.
#----------------------------------------------------------
AM_LDFLAGS=`echo $external_dist_libraries_lib`
AC_SUBST(AM_LDFLAGS)
AM_CPPFLAGS=`echo $external_dist_libraries_include $accumulated_cpp_flags`
AC_SUBST(AM_CPPFLAGS)
# Define "external" libraries
#----------------------------
# These are the third-party libraries distributed with oomph-lib.
# They are only used if the user hasn't specified his/her own
# local version of these.
external_libs='-loomph_hsl -loomph_arpack -loomph_crbond_bessel'
# Triangle?
if test x$suppress_triangle = xfalse; then \
external_libs=`echo $external_libs " -loomph_triangle "`
else
echo "Omitting specification of triangle library as we haven't built"
echo "it locally. Could/should provide option to link against external"
echo "version..."
fi
# Tetgen?
if test x$suppress_tetgen = xfalse; then \
external_libs=`echo $external_libs " -loomph_tetgen "`
else
echo "Omitting specification of tetgen library as we haven't built"
echo "it locally. Could/should provide option to link against external"
echo "version..."
fi
# SuperLU?
if test x$have_superlu = xfalse; then
external_libs=`echo $external_libs " -loomph_superlu_4.3"`
else
echo "Omitting specification of superlu library -- assumed to be"
echo "provided automatically by compiler/linker..."
fi
# Include superlu_dist and parallel metis if compiled in parallel
if test x$want_mpi = xtrue; then
# parmetis?
if test x$have_parmetis = xfalse; then
external_libs=`echo $external_libs " -loomph_parmetis_3.1.1"`
else
echo "Omitting specification of parmetis library -- assumed to be"
echo "provided automatically by compiler/linker..."
fi
# SuperLU_dist?
if test x$have_superlu_dist = xfalse; then
external_libs=`echo $external_libs " -loomph_superlu_dist_3.0"`
else
echo "Omitting specification of superlu_dist library -- assumed to be"
echo "provided automatically by compiler/linker..."
fi
fi
#Note: serial metis has to go last
if test x$have_metis = xfalse; then
external_libs=`echo $external_libs " -loomph_metis_from_parmetis_3.1.1"`
else
echo "Omitting specification of metis library -- assumed to be"
echo "provided automatically by compiler/linker..."
fi
# Pord?
if test x$have_pord = xtrue; then
external_libs=`echo " $PORD_LIB " $external_libs `
fi
# Blacs?
if test x$have_blacs = xtrue; then
external_libs=`echo " $BLACS_LIB/blacs.a $BLACS_LIB/blacsF77.a $BLACS_LIB/blacs_copy.a" $external_libs`
fi
# Scalapack?
if test x$have_scalapack = xtrue; then
external_libs=`echo " $SCALAPACK_LIB " $external_libs `
fi
# Lapack?
if test x$have_lapack = xfalse; then
external_libs=`echo $external_libs " -loomph_lapack -loomph_flapack"`
else
if test "$LAPACK_LIB" != "auto"; then
external_libs=`echo $external_libs " $LAPACK_LIB"`
else
echo "Omitting specification of lapack library -- assumed to be"
echo "provided automatically by compiler/linker..."
fi
fi
# Blas?
if test x$have_blas = xfalse; then
external_libs=`echo $external_libs " -loomph_blas"`
else
if test "$BLAS_LIB" != "auto"; then
external_libs=`echo $external_libs " $BLAS_LIB"`
else
echo "Omitting specification of blas library -- assumed to be"
echo "provided automatically by compiler/linker..."
fi
fi
echo " "
echo "/////////////////////////////////////////////////////////////////////////////////"
echo " "
echo "external_dist_libraries : $external_dist_libraries"
echo "external_dist_libraries_lib : $external_dist_libraries_lib"
echo "external_dist_libraries_include: $external_dist_libraries_include"
echo " "
echo "/////////////////////////////////////////////////////////////////////////////////"
echo " "
# Now add the third-party external libraries that are shared by all
#------------------------------------------------------------------
# Makefile.am-s
#--------------
external_libs=`echo $external_dist_libraries " " $external_libs`
EXTERNAL_LIBS=`echo $external_libs`
AC_SUBST(EXTERNAL_LIBS)
# Include the file containing the constructed AC_CONFIG_FILES([....]) command
m4_include([config/configure.ac_scripts/makefile_list])
# Create the output
AC_OUTPUT()
#-----------------------------------------------------------------
# This macro adjusts config.h to oomph-lib-config.h
# in which all macros are package specific to avoid clashes
# with those declared by other third-party libraries.
#
# Downloaded and adjusted from
#
# http://autoconf-archive.cryp.to/ac_create_prefix_config_h.html
#
# Changes:
# (1) ac_prefix_conf_INP wasn't set correctly. Commented the
# the relevant bit of code out and hard-coded the
# name as config.h
# (2) In the AC_MSG_ERROR macro rather than referring to the variable
# $ac_prefix_conf_INP the non-existent (and therefore empty)
# variable $ac_prefix_conf_IN was referred to. Therefore no
# meaningful error message was produced.
#-----------------------------------------------------------------
AC_DEFUN([AC_CREATE_PREFIX_CONFIG_H],
[changequote({, })dnl
ac_prefix_conf_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
ac_prefix_conf_DEF=`echo _$ac_prefix_conf_OUT | sed -e 'y:abcdefghijklmnopqrstuvwxyz./,-:ABCDEFGHIJKLMNOPQRSTUVWXYZ____:'`
ac_prefix_conf_PKG=`echo ifelse($2, , $PACKAGE, $2)`
ac_prefix_conf_LOW=`echo _$ac_prefix_conf_PKG | sed -e 'y:ABCDEFGHIJKLMNOPQRSTUVWXYZ-:abcdefghijklmnopqrstuvwxyz_:'`
ac_prefix_conf_UPP=`echo $ac_prefix_conf_PKG | sed -e 'y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:' -e '/^[0-9]/s/^/_/'`
#ac_prefix_conf_INP=`echo ifelse($3, , _, $3)`
#if test "$ac_prefix_conf_INP" = "_"; then
# case $ac_prefix_conf_OUT in
# */*) ac_prefix_conf_INP=`basename $ac_prefix_conf_OUT`
# ;;
# *-*) ac_prefix_conf_INP=`echo $ac_prefix_conf_OUT | sed -e 's/[a-zA-Z0-9_]*-//'`
# ;;
# *) ac_prefix_conf_INP=config.h
# ;;
# esac
#fi
ac_prefix_conf_INP=config.h
changequote([, ])dnl
if test -z "$ac_prefix_conf_PKG" ; then
AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
else
AC_MSG_RESULT(creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines)
if test -f $ac_prefix_conf_INP ; then
# AC_ECHO_MKFILE([/* automatically generated */], $ac_prefix_conf_OUT)
changequote({, })dnl
echo '#ifndef '$ac_prefix_conf_DEF >>$ac_prefix_conf_OUT
echo '#define '$ac_prefix_conf_DEF' 1' >>$ac_prefix_conf_OUT
echo ' ' >>$ac_prefix_conf_OUT
echo /'*' $ac_prefix_conf_OUT. Generated automatically at end of configure. '*'/ >>$ac_prefix_conf_OUT
echo 's/#undef *\([A-Z_]\)/#undef '$ac_prefix_conf_UPP'_\1/' >conftest.sed
echo 's/#undef *\([a-z]\)/#undef '$ac_prefix_conf_LOW'_\1/' >>conftest.sed
echo 's/#define *\([A-Z_][A-Za-z0-9_]*\)\(.*\)/#ifndef '$ac_prefix_conf_UPP"_\\1 \\" >>conftest.sed
echo '#define '$ac_prefix_conf_UPP"_\\1 \\2 \\" >>conftest.sed
echo '#endif/' >>conftest.sed
echo 's/#define *\([a-z][A-Za-z0-9_]*\)\(.*\)/#ifndef '$ac_prefix_conf_LOW"_\\1 \\" >>conftest.sed
echo '#define '$ac_prefix_conf_LOW"_\\1 \\2 \\" >>conftest.sed
echo '#endif/' >>conftest.sed
sed -f conftest.sed $ac_prefix_conf_INP >>$ac_prefix_conf_OUT
echo ' ' >>$ac_prefix_conf_OUT
echo '/*' $ac_prefix_conf_DEF '*/' >>$ac_prefix_conf_OUT
echo '#endif' >>$ac_prefix_conf_OUT
touch -r $ac_prefix_conf_INP $ac_prefix_conf_OUT
changequote([, ])dnl
else
AC_MSG_ERROR([input file $ac_prefix_conf_INP does not exist, dnl
skip generating $ac_prefix_conf_OUT])
fi
rm -f conftest.*
fi])
AC_CREATE_PREFIX_CONFIG_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/libo4me/oomph-lib.git
git@gitee.com:libo4me/oomph-lib.git
libo4me
oomph-lib
oomph-lib
development

搜索帮助