From 14f1adcaabfe59ee3a4d233d20a7fd8ac549651e Mon Sep 17 00:00:00 2001
From: Christian Engwer <christi@dune-project.org>
Date: Mon, 4 Aug 2003 16:26:20 +0000
Subject: [PATCH] Now --with-xyz= take again every path.

To everybody:
Please inform the others, if you change features. It's easy to ask, if the
person to kick sith right beside you, but that isn't allways the case.

[[Imported from SVN: r106]]
---
 m4/albert.m4 | 13 +++++++------
 m4/dune.m4   | 13 ++++++++-----
 m4/grape.m4  | 13 +++++++------
 3 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/m4/albert.m4 b/m4/albert.m4
index 19fa235c4..03c81abb2 100644
--- a/m4/albert.m4
+++ b/m4/albert.m4
@@ -17,11 +17,7 @@ AC_DEFUN(DUNE_PATH_ALBERT,
   AC_REQUIRE([DUNE_DIMENSION])
 
   AC_ARG_WITH(albert,
-    AC_HELP_STRING([--with-albert=PATH],[directory with Albert inside]),
-dnl expand tilde / other stuff
-    eval with_albert=$with_albert)
-dnl extract absolute path
-dnl eval with_albert=`cd $with_albert ; pwd`
+    AC_HELP_STRING([--with-albert=PATH],[directory with Albert inside]))
 
 # also ask for elindex
   AC_ARG_WITH(albert_elindex,
@@ -37,7 +33,12 @@ ac_save_LIBS="$LIBS"
 
 # is --with-albert=bla used?
 if test x$with_albert != x ; then
-  ALBERTROOT="$with_albert"
+    if test -d $with_albert; then
+      # expand tilde / other stuff
+      ALBERTROOT=`cd $with_albert && pwd`
+    else
+      AC_MSG_ERROR([directory $with_albert does not exist])
+    fi      
 else
   # use some default value...
   ALBERTROOT="/usr/local/albert"
diff --git a/m4/dune.m4 b/m4/dune.m4
index 660951bac..6425b9186 100644
--- a/m4/dune.m4
+++ b/m4/dune.m4
@@ -19,13 +19,16 @@ AC_DEFUN(DUNE_PATH_DUNE,
 
   # the usual option...
   AC_ARG_WITH(dune,
-    AC_HELP_STRING([--with-dune=PATH],[directory with Dune inside]),
-# expand tilde / other stuff
-    eval with_dune=$with_dune)
+    AC_HELP_STRING([--with-dune=PATH],[directory with Dune inside]))
 
 # is a directory set?
-  if test "x$with_dune" != x ; then
-    DUNEROOT=$with_dune
+  if test "x$with_dune" != x ; then        
+    if test -d $with_dune; then
+      # expand tilde / other stuff
+      DUNEROOT=`cd $with_dune && pwd`
+    else
+      AC_MSG_ERROR([directory $with_dune does not exist])
+    fi      
   else
     # set default path
     DUNEROOT=/usr/local/include/
diff --git a/m4/grape.m4 b/m4/grape.m4
index 96407a7c4..e48859b0c 100644
--- a/m4/grape.m4
+++ b/m4/grape.m4
@@ -21,11 +21,7 @@ AC_DEFUN(DUNE_PATH_GRAPE,
   AC_REQUIRE([DUNE_PATH_OPENGL])
 
   AC_ARG_WITH(grape,
-    AC_HELP_STRING([--with-grape=PATH],[directory with Grape inside]),
-dnl expand tilde / other stuff
-    eval with_grape=$with_grape)
-dnl extract absolute path
-dnl eval with_grape=`cd $with_grape ; pwd`
+    AC_HELP_STRING([--with-grape=PATH],[directory with Grape inside]))
 
 if test "x$X_LIBS" != x ; then
   # store old values
@@ -37,7 +33,12 @@ if test "x$X_LIBS" != x ; then
 
   # is --with-grape=bla used?
   if test x$with_grape != x ; then
-    GRAPEROOT="$with_grape"
+    if test -d $with_grape; then
+      # expand tilde / other stuff
+      GRAPEROOT=`cd $with_grape && pwd`
+    else
+      AC_MSG_ERROR([directory $with_grape does not exist])
+    fi      
   else
     # set some kind of default grape-path...
     GRAPEROOT="/usr/local/grape/"
-- 
GitLab