Patch from Jason Schoon to add optional SIGUSR1 support to dd.
[oweals/busybox.git] / applets / install.sh
index 0173e7a445222f5bf606ca3f4f4c7bce5e3d5908..e154996e3914ef3ed7ca740c71bcc6651832870b 100755 (executable)
@@ -18,11 +18,12 @@ esac
 
 if [ "$DO_INSTALL_LIBS" != "n" ]; then
        # get the target dir for the libs
-       # This is an incomplete/incorrect list for now
-       case $(uname -m) in
-       x86_64|ppc64*|sparc64*|ia64*|hppa*64*|s390x*) libdir=/lib64 ;;
-       *) libdir=/lib ;;
-       esac
+       # assume it starts with lib
+       libdir=$($CC -print-file-name=libc.so | \
+                sed -n 's%^.*\(/lib[^\/]*\)/libc.so%\1%p')
+       if test -z "$libdir"; then
+               libdir=/lib
+       fi
 
        mkdir -p $prefix/$libdir || exit 1
        for i in $DO_INSTALL_LIBS; do