[Users] [svn:cactuscode] FFTW3/trunk/ (Rev. 22)
Erik Schnetter
schnetter at cct.lsu.edu
Mon Apr 22 12:19:41 CDT 2013
A general note:
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).
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.
-erik
On Mon, Apr 22, 2013 at 10:46 AM, <knarf at cct.lsu.edu> wrote:
> User: knarf
> Date: 2013/04/22 09:46 AM
>
> Modified:
> /trunk/
> configure.sh
>
> Log:
> make configure look harder for installed fftw3
>
> File Changes:
>
> Directory: /trunk/
> ==================
>
> File [modified]: configure.sh
> Delta lines: +31 -10
> ===================================================================
> --- trunk/configure.sh 2013-04-10 15:13:01 UTC (rev 21)
> +++ trunk/configure.sh 2013-04-22 14:46:28 UTC (rev 22)
> @@ -11,31 +11,52 @@
> set -e # Abort on errors
>
>
> -
>
> ################################################################################
> # Search
>
> ################################################################################
>
> -if [ -z "${FFTW3_DIR}" ]; then
> +if [ -z "${FFTW3_DIR}" \
> + -o "$(echo "${FFTW3_DIR}" | tr '[a-z]' '[A-Z]')" = 'NO_BUILD' ]
> +then
> echo "BEGIN MESSAGE"
> echo "FFTW3 selected, but FFTW3_DIR not set. Checking some places..."
> echo "END MESSAGE"
> -
> - FILES="include/fftw3.h"
> - DIRS="/usr /usr/local /usr/local/fftw3 /usr/local/packages/fftw3
> /usr/local/apps/fftw3 ${HOME} c:/packages/fftw3"
> +
> + DIRS="/usr /usr/local /usr/local/packages /usr/local/apps /opt/local
> ${HOME} c:/packages"
> for dir in $DIRS; do
> - FFTW3_DIR="$dir"
> - for file in $FILES; do
> - if [ ! -r "$dir/$file" ]; then
> - unset FFTW3_DIR
> + DIRS="$DIRS $dir/fftw3"
> + done
> + for dir in $DIRS; do
> + # libraries might have different file extensions
> + for libext in a so dylib; do
> + # libraries can be in /lib or /lib64
> + for libdir in lib64 lib/x86_64-linux-gnu lib
> lib/i386-linux-gnu; do
> + FILES="include/fftw3.h $libdir/libfftw3.$libext"
> + # assume this is the one and check all needed files
> + FFTW3_DIR="$dir"
> + for file in $FILES; do
> + # discard this directory if one file was not found
> + if [ ! -r "$dir/$file" ]; then
> + unset FFTW3_DIR
> + break
> + fi
> + done
> + # don't look further if all files have been found
> + if [ -n "$FFTW3_DIR" ]; then
> + break
> + fi
> + done
> + # don't look further if all files have been found
> + if [ -n "$FFTW3_DIR" ]; then
> break
> fi
> done
> + # don't look further if all files have been found
> if [ -n "$FFTW3_DIR" ]; then
> break
> fi
> done
> -
> +
> if [ -z "$FFTW3_DIR" ]; then
> echo "BEGIN MESSAGE"
> echo "FFTW3 not found"
>
> _______________________________________________
> Commits mailing list
> Commits at cactuscode.org
> http://cactuscode.org/mailman/listinfo/commits
>
--
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20130422/1391e6fe/attachment.html
More information about the Users
mailing list