[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: none




Harald Barth <haba@pdc.kth.se> writes:

> When you do the following:
>
> $ export PATH=/usr/athena1/bin:$PATH 
> $ ./configure --with-krb4=/usr/athena2 ...
>
> there is a conflict where the value for the libs we'll be linking
> against should be taken from. From /usr/athena1/bin/krb4-config --libs
> or /usr/athena2/bin/krb4-config --libs or somewhere else? The same
> applies to other packages with such a *-config script.
>
> The following patch makes the command line argument (+/bin/) the first
> choice and the krb4-config in PATH the second choice. Personally I don't
> like the idea of being dependent on PATH at all, but that may be the
> best compromise.

So you are proponent for --with-make=, --with-cc=, --with-ld=, --with-sed=,
--with-sh=, --with-system-runtime-path=, etc too ?

Depending on PATH isn't whats wrong. might be so that argument should
evaluated {at all, in diffrent order, not at all} instead.

There is also the issue with $(EXEEXT) when given an absolute path.

> Disclaimer: Others might do a much better job in achieving the
> "right thing" with autosomething and m4, see it as an example.
> You might want to indent this different, too.

I think you are mixing compile time and runtime checks in a non obvious
manner.

Love

(untested)

Index: test-package.m4
===================================================================
RCS file: /afs/pdc.kth.se/src/packages/kth-krb/SourceRepository/aux/test-package.m4,v
retrieving revision 1.12
diff -u -u -w -r1.12 test-package.m4
--- test-package.m4	10 Sep 2002 15:23:38 -0000	1.12
+++ test-package.m4	26 Jan 2004 14:59:31 -0000
@@ -69,6 +69,15 @@
 
 case "$with_$1_config" in
 yes|no|"")
+	if test -f $with_$1/bin/$with_$1_config ; then
+		$with_$1_config=$with_$1/bin/$with_$1_config
+	fi
+	;;
+easc
+
+
+case "$with_$1_config" in
+yes|no|"")
 	;;
 *)
 	$1_cflags="`$with_$1_config --cflags 2>&1`"

PGP signature