Hi,

You probably noticed the Debian ITP (Intention To Package) that I filed
today regarding XMDS.  The package is in a good shape now and I uploaded a
preliminary version to the following apt-getable repository:

    http://people.debian.org/~rafael/xmds/

You will notice that the package needs two patches to build and work
correctly.  I am attaching them to this message.  Here are brief
descriptions:

    50-preserve-prefix.patch:
       Remove the ugly "one-single-directory" setting when --prefix is used.

    50-either-fftw-or-fftw3.patch:
       Either use fftw2 or fftw3 according to --enable-fftw3.  This patch is
       necessary because it is impossible otherwise to build the pacakge
       without the fftw-dev package installed, even if we specify
       --enable-fftw3. 

The package installs all the examples in the usual Debian way (i,e, in
/usr/share/doc/smds/examples) and they are automatically patched to use
fftw3 (BTW, it would be good if this was done upstream, according to 
--enable-fftw3).

I am also attaching below the README.Debian, which contains a nice cookbook
for building/running an example and visualizing the results with Octave and
gv.

Finally, it would be good to add a test suite for the package, which could
be run with "make check".  Automake has provisions for that.

If Christian does not object, I will upload the package soon.

Cheers,

-- 
Rafael
diff -Nur xmds-1.5-3/configure.in xmds-1.5-3.new/configure.in
--- xmds-1.5-3/configure.in     2006-09-19 06:46:59.000000000 +0200
+++ xmds-1.5-3.new/configure.in 2006-11-24 08:52:22.000000000 +0100
@@ -57,17 +57,6 @@
            [USER_INCLUDE="."
             USER_LIB="."])
 
-dnl Just in case --prefix is used, handle the possibility
-if test "$prefix" != "NONE"
-then
-       USER_INCLUDE="$prefix"
-       USER_LIB="$prefix"
-       bindir="$prefix"
-       includedir="$prefix"
-       libdir="$prefix"
-       mandir="$prefix"
-fi
-
 dnl Do we need extral libs passed to check for mpi? (eg -llam)
 AC_ARG_WITH([mpi-libs],
            [  --with-mpi-libs          Extra libraries needed when checking 
for MPI],
diff -Nur xmds-1.5-3/configure.in xmds-1.5-3.new/configure.in
--- xmds-1.5-3/configure.in     2006-11-25 00:17:41.000000000 +0100
+++ xmds-1.5-3.new/configure.in 2006-11-25 00:20:37.000000000 +0100
@@ -232,34 +232,24 @@
 AC_CHECK_SIZEOF(unsigned long)
 # This defines SIZEOF_UNSIGNED_LONG, which is 4 for 32 bit and 8 for 64 bit
 
-dnl We need to make sure that fftw exits, and that it is the right version
-if test "x$FFTW_PATH" = "x"
+# check for fftw3 if we enabled its use
+if test x"$enable_fftw3" = "xyes"
 then
-AC_CHECK_HEADERS(["$FFTW_INCLUDE_PATH"fftw.h],[],
+
+  dnl We need to make sure that fftw exits, and that it is the right version
+  if test "x$FFTW_PATH" = "x"
+  then
+    AC_CHECK_HEADERS(["$FFTW_INCLUDE_PATH"fftw3.h],[],
            [echo "Eeek!  I can't find fftw.h!";
             echo "It doesn't look like you'll be able to use fftw";
             echo "Are you sure that --with-fftw-path is set correctly?"])
-else
-AC_CHECK_FILE(["$FFTW_INCLUDE_PATH"fftw.h],[],
+  else
+    AC_CHECK_FILE(["$FFTW_INCLUDE_PATH"fftw3.h],[],
             [echo "Eeek!  I can't find fftw.h!";
             echo "It doesn't look like you'll be able to use fftw";
             echo "Are you sure that --with-fftw-path is set correctly?"])
-fi
-
-
-AC_CHECK_LIB([fftw], 
-    [fftw_create_plan],
-    [FFTW_LIBS="-lfftw"],
-    [echo "Bummer!  fftw doesn't seem to work";
-    echo "You need fftw to use xmds properly.";
-    echo "Please download from http://www.fftw.org";;
-    echo "install it, and try configuring xmds again";
-    exit],
-    ["$FFTW_LIB_PATH"])
+  fi
 
-# check for fftw3 if we enabled its use
-if test x"$enable_fftw3" = "xyes"
-then
   AC_CHECK_LIB([fftw3],
     [fftw_execute],
     [FFTW3_LIBS="-lfftw3"],
@@ -270,6 +260,33 @@
      echo "fftw3 is available from http://www.fftw.org";;
      exit],
      ["$FFTW3_LIB_PATH"])
+
+else
+
+  dnl We need to make sure that fftw exits, and that it is the right version
+  if test "x$FFTW_PATH" = "x"
+  then
+    AC_CHECK_HEADERS(["$FFTW_INCLUDE_PATH"fftw.h],[],
+           [echo "Eeek!  I can't find fftw.h!";
+            echo "It doesn't look like you'll be able to use fftw";
+            echo "Are you sure that --with-fftw-path is set correctly?"])
+  else
+    AC_CHECK_FILE(["$FFTW_INCLUDE_PATH"fftw.h],[],
+            [echo "Eeek!  I can't find fftw.h!";
+            echo "It doesn't look like you'll be able to use fftw";
+            echo "Are you sure that --with-fftw-path is set correctly?"])
+  fi
+
+  AC_CHECK_LIB([fftw], 
+    [fftw_create_plan],
+    [FFTW_LIBS="-lfftw"],
+    [echo "Bummer!  fftw doesn't seem to work";
+    echo "You need fftw to use xmds properly.";
+    echo "Please download from http://www.fftw.org";;
+    echo "install it, and try configuring xmds again";
+    exit],
+    ["$FFTW_LIB_PATH"])
+
 fi
 
 FFTW3_THREADLIBS=$THREADLIBS
xmds for Debian
---------------

  This version of XMDS has been compiled against the fftw3 library, instead
  of the default fftw2.  This means that the simulations will only work if
  the following XML code is present in the *.xmds file:

      <fftw_version>3</fftw_version>

  inside the <simulation> target.

  All examples included in the Debian package in directory
  /usr/share/doc/xmds/examples have been changed accordingly.  To run one of
  them and visualize the results, you can do, e.g.:

      xmds /usr/share/doc/xmds/examples/nlse.xmds
      ./nlse
      xsil2graphics nlse.xsil
      echo "nlse;mesh(z_1,t_1,pow_dens_1);print nlse.eps -color -deps" \
           | octave -qf
      gv nlse.eps

  Notice that you must have one of the octave package (octave2.1 or
  octave2.9) and the gv package installed in your system in order to run
  the code above.

 -- Rafael Laboissiere <[EMAIL PROTECTED]>  Thu, 25 Nov 2006 10:10:09 +0100

Reply via email to