This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: /usr/include/scsi


On 28 Nov 1998 15:00:47 -0800, Ulrich Drepper wrote:
>Philip Blundell <philb@gnu.org> writes:
>
>> Does it seem reasonable for `make install' to check if this directory is a 
>> symlink and remove it if so?  Alternatively, maybe `configure' could do the 
>> check and instruct the user to delete the symlink if appropriate.
>
>If this is a common problem it should be tested for.  Probably at
>configure time.  Just abort and let the user repair the damage is
>adequate.

Deleting the symlink falls into the `nasty package does things behind
my back' category IMO.  Aborting with an error message is much
preferred.

How's this?

zw

1998-11-28 23:23 -0500  Zack Weinberg  <zack@rabi.phys.columbia.edu>

	* sysdeps/unix/sysv/linux/configure.in: Test for symlinks in
	$prefix/include that may be clobbered on installation.

============================================================
Index: sysdeps/unix/sysv/linux/configure.in
--- sysdeps/unix/sysv/linux/configure.in	1998/08/21 22:29:18	1.16
+++ sysdeps/unix/sysv/linux/configure.in	1998/11/29 04:20:06
@@ -101,3 +101,26 @@
     ;;
 esac
 changequote([,])
+
+# If $prefix/include/{net,scsi} are symlinks, make install will
+# clobber what they're linked to (probably a kernel tree).
+# test -L ought to work on all Linux boxes.
+echo $ac_n "checking for symlinks in ${prefix}/include...$ac_c"
+if test -L ${prefix}/include/net
+then message="   ${prefix}/include/net is a symlink"
+fi
+if test -L ${prefix}/include/scsi
+then message="$message
+   ${prefix}/include/scsi is a symlink"
+fi
+if test -n "$message"; then
+echo "
+*** error:
+$message
+\`make install' will destroy the target of the link(s).
+Delete the links and re-run configure, or better still, move the entire
+${prefix}/include directory out of the way."
+exit 1
+else
+echo " ok"
+fi



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]