From c9fffacc48d21d346cabc04f6d82be6887fbd38b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20Kl=C3=B6fkorn?= <robertk@dune-project.org>
Date: Wed, 10 Aug 2005 11:50:39 +0000
Subject: [PATCH] renamed alu3dgrid to alugrid, as the package name. Modified
 the corresponding file too.

[[Imported from SVN: r2532]]
---
 m4/Makefile.am  |   2 +-
 m4/alu3dgrid.m4 | 108 ------------------------------------------------
 m4/alugrid.m4   | 107 +++++++++++++++++++++++++++++++++++++++++++++++
 m4/dune_all.m4  |   4 +-
 4 files changed, 110 insertions(+), 111 deletions(-)
 delete mode 100644 m4/alu3dgrid.m4
 create mode 100644 m4/alugrid.m4

diff --git a/m4/Makefile.am b/m4/Makefile.am
index 12eb26d10..caebeafe4 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -1,6 +1,6 @@
 # $Id$
 
-ALLM4S = acx_mpi.m4 acx_pthread.m4 alberta.m4 alu3dgrid.m4 ax_check_gl.m4 \
+ALLM4S = acx_mpi.m4 acx_pthread.m4 alberta.m4 alugrid.m4 ax_check_gl.m4 \
   blas.m4 dimension.m4 dune_all.m4 dune_amira.m4 dune_compiler.m4 \
   dune_deprecated.m4 dune.m4 dune_mpi.m4 f5.m4 grape.m4 \
   parmetis.m4 hdf5.m4 inkscape.m4 opengl.m4 ug.m4 xdr.m4
diff --git a/m4/alu3dgrid.m4 b/m4/alu3dgrid.m4
deleted file mode 100644
index 7f5c28e4e..000000000
--- a/m4/alu3dgrid.m4
+++ /dev/null
@@ -1,108 +0,0 @@
-# $Id$
-# searches for alu3dgrid-headers and libs
-
-AC_DEFUN([DUNE_PATH_ALU3DGRID],[
-  AC_REQUIRE([AC_PROG_CXX])
-
-  AC_ARG_WITH(alu3dgrid,
-    AC_HELP_STRING([--with-alu3dgrid=PATH],[directory with ALU3d-Grid inside]))
-# do not use alu3dgrid debug lib 
-
-# store old values
-ac_save_LDFLAGS="$LDFLAGS"
-ac_save_CPPFLAGS="$CPPFLAGS"
-ac_save_LIBS="$LIBS"
-# LIBS=""
-
-## do nothing if no --with-alu3dgrid was supplied
-if test x$with_alu3dgrid != x && test x$with_alu3dgrid != xno ; then
-
-  if test x$with_alu3dgrid == xyes ; then
-    AC_MSG_ERROR([You have to provide a directory --with-alu3dgrid=PATH])
-  fi
-
-  if test -d $with_alu3dgrid; then
-    # expand tilde / other stuff
-    ALU3DGRIDROOT=`cd $with_alu3dgrid && pwd`
-  else
-    AC_MSG_ERROR([Path $with_alu3dgrid supplied for --with-alu3dgrid does not exist!])
-  fi
-
-  ALU3DGRID_LIB_PATH="$ALU3DGRIDROOT/lib"
-  ALU3DGRID_INCLUDE_PATH="$ALU3DGRIDROOT/include"
-
-  # set variables so that tests can use them
-  REM_CPPFLAGS=$CPPFLAGS
-
-  LDFLAGS="$LDFLAGS -static -L$ALU3DGRID_LIB_PATH"
-  ALU3D_INC_FLAG="-I$ALU3DGRID_INCLUDE_PATH -I$ALU3DGRID_INCLUDE_PATH/serial -I$ALU3DGRID_INCLUDE_PATH/duneinterface"
-  CPPFLAGS="$CPPFLAGS $ALU3D_INC_FLAG"
-
-  # check for header
-  AC_LANG_PUSH([C++])
-  AC_CHECK_HEADERS([alu3dgrid_serial.h], 
-     [ALU3DGRID_CPPFLAGS="$ALU3D_INC_FLAG"
-    HAVE_ALU3DGRID="1"],
-    AC_MSG_WARN([alu3dgrid_serial.h not found in $ALU3DGRID_INCLUDE_PATH]))
-   
-  ALU3D_INC_FLAG_PARA="-I$ALU3DGRID_INCLUDE_PATH/parallel $MPI_CPPFLAGS"
-  CPPFLAGS="$CPPFLAGS $ALU3D_INC_FLAG_PARA"
-  # check for parallel header 
-  AC_CHECK_HEADERS([alu3dgrid_parallel.h], 
-     [ALU3DGRID_CPPFLAGS="$ALU3D_INC_FLAG $ALU3D_INC_FLAG_PARA"
-    HAVE_ALU3DGRID="1"],
-    AC_MSG_WARN([alu3dgrid_parallel.h not found in $ALU3DGRID_INCLUDE_PATH]))
-
-  CPPFLAGS="$REM_CPPFLAGS"
-  REM_CPPFLAGS=
-
-  REM_LDFLAGS=$LDFLAGS
-
-  # if header is found...
-  if test x$HAVE_ALU3DGRID = x1 ; then
-    AC_CHECK_LIB(alu3dgrid,[main],
-    [ALU3DGRID_LIBS="-lalu3dgrid"
-           ALU3DGRID_LDFLAGS="-L$ALU3DGRID_LIB_PATH"
-           LIBS="$LIBS $ALU3DGRID_LIBS"],
-	  [HAVE_ALU3DGRID="0"
-	  AC_MSG_WARN(libalu3dgrid not found!)])
-  fi
-
-  LDFLAGS=$REM_LDFLAGS
-  AC_LANG_POP
-
-## end of alu3dgrid check (--without wasn't set)
-fi
-
-# survived all tests?
-if test x$HAVE_ALU3DGRID = x1 ; then
-  AC_SUBST(ALU3DGRID_LIBS, $ALU3DGRID_LIBS)
-  AC_SUBST(ALU3DGRID_LDFLAGS, $ALU3DGRID_LDFLAGS)
-  AC_SUBST(ALU3DGRID_CPPFLAGS, $ALU3DGRID_CPPFLAGS)
-  AC_DEFINE(HAVE_ALU3DGRID, 1, [Define to 1 if alu3dgrid-library is found])
-
-  # add to global list
-  DUNE_PKG_LDFLAGS="$DUNE_PKG_LDFLAGS $ALU3DGRID_LDFLAGS"
-  DUNE_PKG_LIBS="$DUNE_PKG_LIBS $ALU3DGRID_LIBS"
-  DUNE_PKG_CPPFLAGS="$DUNE_PKG_CPPFLAGS $ALU3DGRID_CPPFLAGS"
-
-  # set variable for summary
-  with_alu3dgrid="yes"
-else
-  AC_SUBST(ALU3DGRID_LIBS, "")
-  AC_SUBST(ALU3DGRID_LDFLAGS, "")
-  AC_SUBST(ALU3DGRID_CPPFLAGS, "")
-
-  # set variable for summary
-  with_alu3dgrid="no"
-fi
-  
-# also tell automake
-AM_CONDITIONAL(ALU3DGRID, test x$HAVE_ALU3DGRID = x1)
-
-# reset old values
-LIBS="$ac_save_LIBS"
-CPPFLAGS="$ac_save_CPPFLAGS"
-LDFLAGS="$ac_save_LDFLAGS"
-
-])
diff --git a/m4/alugrid.m4 b/m4/alugrid.m4
new file mode 100644
index 000000000..466d5e2b6
--- /dev/null
+++ b/m4/alugrid.m4
@@ -0,0 +1,107 @@
+# searches for alugrid-headers and libs
+
+AC_DEFUN([DUNE_PATH_ALUGRID],[
+  AC_REQUIRE([AC_PROG_CXX])
+
+  AC_ARG_WITH(alugrid,
+    AC_HELP_STRING([--with-alugrid=PATH],[directory with ALU3d-Grid inside]))
+# do not use alugrid debug lib 
+
+# store old values
+ac_save_LDFLAGS="$LDFLAGS"
+ac_save_CPPFLAGS="$CPPFLAGS"
+ac_save_LIBS="$LIBS"
+# LIBS=""
+
+## do nothing if no --with-alugrid was supplied
+if test x$with_alugrid != x && test x$with_alugrid != xno ; then
+
+  if test x$with_alugrid == xyes ; then
+    AC_MSG_ERROR([You have to provide a directory --with-alugrid=PATH])
+  fi
+
+  if test -d $with_alugrid; then
+    # expand tilde / other stuff
+    ALUGRIDROOT=`cd $with_alugrid && pwd`
+  else
+    AC_MSG_ERROR([Path $with_alugrid supplied for --with-alugrid does not exist!])
+  fi
+
+  ALUGRID_LIB_PATH="$ALUGRIDROOT/lib"
+  ALUGRID_INCLUDE_PATH="$ALUGRIDROOT/include"
+
+  # set variables so that tests can use them
+  REM_CPPFLAGS=$CPPFLAGS
+
+  LDFLAGS="$LDFLAGS -static -L$ALUGRID_LIB_PATH"
+  ALU3D_INC_FLAG="-I$ALUGRID_INCLUDE_PATH -I$ALUGRID_INCLUDE_PATH/serial -I$ALUGRID_INCLUDE_PATH/duneinterface"
+  CPPFLAGS="$CPPFLAGS $ALU3D_INC_FLAG"
+
+  # check for header
+  AC_LANG_PUSH([C++])
+  AC_CHECK_HEADERS([alugrid_serial.h], 
+     [ALUGRID_CPPFLAGS="$ALU3D_INC_FLAG"
+    HAVE_ALUGRID="1"],
+    AC_MSG_WARN([alugrid_serial.h not found in $ALUGRID_INCLUDE_PATH]))
+   
+  ALU3D_INC_FLAG_PARA="-I$ALUGRID_INCLUDE_PATH/parallel $MPI_CPPFLAGS"
+  CPPFLAGS="$CPPFLAGS $ALU3D_INC_FLAG_PARA"
+  # check for parallel header 
+  AC_CHECK_HEADERS([alugrid_parallel.h], 
+     [ALUGRID_CPPFLAGS="$ALU3D_INC_FLAG $ALU3D_INC_FLAG_PARA"
+    HAVE_ALUGRID="1"],
+    AC_MSG_WARN([alugrid_parallel.h not found in $ALUGRID_INCLUDE_PATH]))
+
+  CPPFLAGS="$REM_CPPFLAGS"
+  REM_CPPFLAGS=
+
+  REM_LDFLAGS=$LDFLAGS
+
+  # if header is found...
+  if test x$HAVE_ALUGRID = x1 ; then
+    AC_CHECK_LIB(alugrid,[main],
+    [ALUGRID_LIBS="-lalugrid"
+           ALUGRID_LDFLAGS="-L$ALUGRID_LIB_PATH"
+           LIBS="$LIBS $ALUGRID_LIBS"],
+	  [HAVE_ALUGRID="0"
+	  AC_MSG_WARN(libalugrid not found!)])
+  fi
+
+  LDFLAGS=$REM_LDFLAGS
+  AC_LANG_POP
+
+## end of alugrid check (--without wasn't set)
+fi
+
+# survived all tests?
+if test x$HAVE_ALUGRID = x1 ; then
+  AC_SUBST(ALUGRID_LIBS, $ALUGRID_LIBS)
+  AC_SUBST(ALUGRID_LDFLAGS, $ALUGRID_LDFLAGS)
+  AC_SUBST(ALUGRID_CPPFLAGS, $ALUGRID_CPPFLAGS)
+  AC_DEFINE(HAVE_ALUGRID, 1, [Define to 1 if alugrid-library is found])
+
+  # add to global list
+  DUNE_PKG_LDFLAGS="$DUNE_PKG_LDFLAGS $ALUGRID_LDFLAGS"
+  DUNE_PKG_LIBS="$DUNE_PKG_LIBS $ALUGRID_LIBS"
+  DUNE_PKG_CPPFLAGS="$DUNE_PKG_CPPFLAGS $ALUGRID_CPPFLAGS"
+
+  # set variable for summary
+  with_alugrid="yes"
+else
+  AC_SUBST(ALUGRID_LIBS, "")
+  AC_SUBST(ALUGRID_LDFLAGS, "")
+  AC_SUBST(ALUGRID_CPPFLAGS, "")
+
+  # set variable for summary
+  with_alugrid="no"
+fi
+  
+# also tell automake
+AM_CONDITIONAL(ALUGRID, test x$HAVE_ALUGRID = x1)
+
+# reset old values
+LIBS="$ac_save_LIBS"
+CPPFLAGS="$ac_save_CPPFLAGS"
+LDFLAGS="$ac_save_LDFLAGS"
+
+])
diff --git a/m4/dune_all.m4 b/m4/dune_all.m4
index dbc641645..7bc77cb03 100644
--- a/m4/dune_all.m4
+++ b/m4/dune_all.m4
@@ -53,7 +53,7 @@ dnl check all components
   AC_REQUIRE([DUNE_PATH_AMIRAMESH])
   AC_REQUIRE([DUNE_MPI])
   AC_REQUIRE([DUNE_PATH_PARMETIS])
-  AC_REQUIRE([DUNE_PATH_ALU3DGRID])
+  AC_REQUIRE([DUNE_PATH_ALUGRID])
 
   if test x$HAVE_DUNE != x1 ; then
     AC_MSG_ERROR([Can't work without the DUNE-library. Maybe you have to supply your DUNE-directory as --with-dune=dir])
@@ -75,7 +75,7 @@ AC_DEFUN([DUNE_SUMMARY_ALL],[
   echo "-----------------------------"
   echo  
   echo "Alberta..........: $with_alberta"
-  echo "ALU3d-Grid.......: $with_alu3dgrid"
+  echo "ALUGrid..........: $with_alugrid"
   echo "AmiraMesh........: $with_amiramesh"
   echo "BLAS-lib.........: $with_blas"
   echo "Grape............: $with_grape"
-- 
GitLab