Re: xmkmf can't find files

Patrick E (pre@pre.org)
Thu, 13 Aug 1998 15:25:26 +0100 (BST)


On Wed, 12 Aug 1998, Guylhem Aznar wrote:

> On Tue, Aug 11, 1998 at 09:55:30PM +0100, Patrick E wrote:
> > One suggestion though - could a bit of "inheritance" be added in
> > the configure script so it does the following
> > * Users GNUstep path (~/GNUstep/): ~/.gnustep/
> > * Users GNUstep Library path (~/.gnustep/Library):
> > * Users AfterStep path (~/.gnustep/Library/AfterStep):
> > rather than having to give the whole thing again each time (it
> > wraps off the edge of the screen, and backspacing gets a bit
> > fruity). Should be a small tweak...
> > 
> It's just a matter of shell script (in autoconf/configure.in), feel free
> to enhance it.
> 
I make no apologies for how ugly this is. Or any claims that it
works, for that matter, though I have tested it out and it seems
to be okay.
I hate leaving things to chance, so it can spot whether a full
path is given, whether a path within the home dir is given, or
whether it's just a directory to plonk on the end. Not very clear
to the end user, so it deals with assumptions.

Anyway...
Made against the stock pre7 AfterStep-current/autoconf/configure.in

--- configure.in.old	Thu Aug  6 16:53:14 1998
+++ configure.in	Thu Aug 13 15:09:55 1998
@@ -71,9 +71,9 @@
 mod_dir="/usr/local/bin"
 man_dir="/usr/local/man/man1"
 share_dir="/usr/local/share/afterstep"
-gnustep="~/GNUstep/"
-gnusteplib="~/GNUstep/Library"
-after_dir="~/GNUstep/Library/AfterStep"
+gnustep="~/GNUstep"
+gnusteplib="Library"
+after_dir="AfterStep"
 xpm_dir="/usr/X11R6/include/X11/pixmaps"
 bpm_dir="/usr/X11R6/include/X11/bitmaps"
 ximageloader="xli -onroot -quiet -colors 20"
@@ -158,16 +158,34 @@
   gnustep=${retval}
  fi
 
- echo -n "* Users GNUstep Library path (${gnusteplib}): "
+ echo -n "* Users GNUstep Library path (${gnustep}/${gnusteplib}): "
  read retval
  if ! test "${retval}" = "" ; then
-  gnusteplib=${retval}
- fi
-
- echo -n "* Users AfterStep path (${after_dir}): "
- read retval
- if ! test "${retval}" = "" ; then
-  after_dir=${retval}
+    case ${retval} in
+       ${gnustep}/* | /* | ~/* | \~/* )
+          gnusteplib=${retval}
+          ;;
+       * )
+          gnusteplib=${gnustep}/${retval}
+          ;;
+    esac
+ else
+   gnusteplib=${gnustep}/${gnusteplib}
+ fi
+
+ echo -n "* Users AfterStep path (${gnusteplib}/${after_dir}): "
+ read retval
+ if ! test "${retval}" = "" ; then
+    case ${retval} in
+       ${gnusteplib}/* | /* | ~/* | \~/* )
+          after_dir=${retval}
+          ;;
+       * )
+          after_dir=${gnusteplib}/${retval}
+          ;;
+    esac
+ else
+   after_dir=${gnusteplib}/${after_dir}
  fi
 
  echo -n "* Minimum XPM pixmaps path (${xpm_dir}): "

-- 
Patrick E - Yamaha killer, code spooner and lord of the flies
pre at pre dot org                            www.pre.org/pre
Opinions expressed herein may not even be those of the author


--
   WWW:   http://www.afterstep.org/
   FTP:   ftp://ftp.afterstep.org/
   MAIL:  http://www.caldera.com/linuxcenter/forums/afterstep.html