Welcome to little lamb

Code » comain » commit bb2ae27

configure: Default prefix to /usr

author Olivier Brunel
2023-01-26 08:24:27 UTC
committer Olivier Brunel
2023-01-26 08:24:27 UTC
parent ff169d089e40331dbb1d46ed1e9051d8265b5d38

configure: Default prefix to /usr

Helps making incdir & sharedir (usually) working on a ./configure

configure +3 -2

diff --git a/configure b/configure
index a486f81..ae09cbf 100755
--- a/configure
+++ b/configure
@@ -32,7 +32,7 @@ usage: $0 [OPTION..]
 
       --target=TARGET               Set target to run as TARGET [detected]
 
-      --prefix=PREFIX               Set main installation prefix to PREFIX [/]
+      --prefix=PREFIX               Set main installation prefix to PREFIX [/usr]
       --bindir=DIR                  Set binary directory to DIR [PREFIX/bin]
       --libdir=DIR                  Set library directory to DIR [PREFIX/lib]
       --incdir=DIR                  Set include directory to DIR [PREFIX/include]
@@ -57,7 +57,7 @@ EOF
 
 target=
 
-prefix=/
+prefix=
 bindir=
 libdir=
 incdir=
@@ -104,6 +104,7 @@ for arg ; do
     esac
 done
 
+if test -z "$prefix"; then prefix="/usr"; fi
 if test -z "$bindir"; then bindir="$prefix/bin"; fi
 if test -z "$libdir"; then libdir="$prefix/lib"; fi
 if test -z "$incdir"; then incdir="$prefix/include"; fi