<div dir="ltr">A general note:<div><br></div><div>We do not want to run the auto-detection when *_DIR is NO_BUILD. To run the auto-detection, leave this variable blank. NO_BUILD is reserved for cases where the library is known to be found by means opaque to the configure script (e.g. MPI that is always present on Crays).</div>
<div><br></div><div>There was a discussion about this in Trac, and we initially and erroneously agreed that running the auto-detection would be a good idea. It turns out it wasn't (it broke the build on several systems), and thus we reverted this change.<br>
<div><br></div><div>-erik</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 22, 2013 at 10:46 AM, <span dir="ltr"><<a href="mailto:knarf@cct.lsu.edu" target="_blank">knarf@cct.lsu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">User: knarf<br>
Date: 2013/04/22 09:46 AM<br>
<br>
Modified:<br>
/trunk/<br>
configure.sh<br>
<br>
Log:<br>
make configure look harder for installed fftw3<br>
<br>
File Changes:<br>
<br>
Directory: /trunk/<br>
==================<br>
<br>
File [modified]: configure.sh<br>
Delta lines: +31 -10<br>
===================================================================<br>
--- trunk/configure.sh 2013-04-10 15:13:01 UTC (rev 21)<br>
+++ trunk/configure.sh 2013-04-22 14:46:28 UTC (rev 22)<br>
@@ -11,31 +11,52 @@<br>
set -e # Abort on errors<br>
<br>
<br>
-<br>
################################################################################<br>
# Search<br>
################################################################################<br>
<br>
-if [ -z "${FFTW3_DIR}" ]; then<br>
+if [ -z "${FFTW3_DIR}" \<br>
+ -o "$(echo "${FFTW3_DIR}" | tr '[a-z]' '[A-Z]')" = 'NO_BUILD' ]<br>
+then<br>
echo "BEGIN MESSAGE"<br>
echo "FFTW3 selected, but FFTW3_DIR not set. Checking some places..."<br>
echo "END MESSAGE"<br>
-<br>
- FILES="include/fftw3.h"<br>
- DIRS="/usr /usr/local /usr/local/fftw3 /usr/local/packages/fftw3 /usr/local/apps/fftw3 ${HOME} c:/packages/fftw3"<br>
+<br>
+ DIRS="/usr /usr/local /usr/local/packages /usr/local/apps /opt/local ${HOME} c:/packages"<br>
for dir in $DIRS; do<br>
- FFTW3_DIR="$dir"<br>
- for file in $FILES; do<br>
- if [ ! -r "$dir/$file" ]; then<br>
- unset FFTW3_DIR<br>
+ DIRS="$DIRS $dir/fftw3"<br>
+ done<br>
+ for dir in $DIRS; do<br>
+ # libraries might have different file extensions<br>
+ for libext in a so dylib; do<br>
+ # libraries can be in /lib or /lib64<br>
+ for libdir in lib64 lib/x86_64-linux-gnu lib lib/i386-linux-gnu; do<br>
+ FILES="include/fftw3.h $libdir/libfftw3.$libext"<br>
+ # assume this is the one and check all needed files<br>
+ FFTW3_DIR="$dir"<br>
+ for file in $FILES; do<br>
+ # discard this directory if one file was not found<br>
+ if [ ! -r "$dir/$file" ]; then<br>
+ unset FFTW3_DIR<br>
+ break<br>
+ fi<br>
+ done<br>
+ # don't look further if all files have been found<br>
+ if [ -n "$FFTW3_DIR" ]; then<br>
+ break<br>
+ fi<br>
+ done<br>
+ # don't look further if all files have been found<br>
+ if [ -n "$FFTW3_DIR" ]; then<br>
break<br>
fi<br>
done<br>
+ # don't look further if all files have been found<br>
if [ -n "$FFTW3_DIR" ]; then<br>
break<br>
fi<br>
done<br>
-<br>
+<br>
if [ -z "$FFTW3_DIR" ]; then<br>
echo "BEGIN MESSAGE"<br>
echo "FFTW3 not found"<br>
<br>
_______________________________________________<br>
Commits mailing list<br>
<a href="mailto:Commits@cactuscode.org">Commits@cactuscode.org</a><br>
<a href="http://cactuscode.org/mailman/listinfo/commits" target="_blank">http://cactuscode.org/mailman/listinfo/commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>><br><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a>
</div>