forked from apertium/apertium-ell-eng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix autogen.sh so users don't have to set PKG_CONFIG_PATH and similar…
… *PATH's
- Loading branch information
Showing
1 changed file
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,35 @@ | ||
#! /bin/sh | ||
|
||
# Append any prefix from PKG_CONFIG_PATH to ACLOCAL_PATH | ||
OLDIFS=IFS | ||
IFS=':' | ||
for dir in $PKG_CONFIG_PATH; do | ||
acdir="$dir/../../share/aclocal" | ||
[ -x "$acdir" ] && ACLOCAL_PATH="${ACLOCAL_PATH}:$acdir" | ||
# If the user specified a --prefix, take that, otherwise /usr/local/ | ||
# is the default. | ||
PREFIX=/usr/local | ||
prefixnext=false | ||
for i in "$@"; do | ||
case $i in | ||
--prefix=*) # equals separated: | ||
PREFIX="${i#*=}" | ||
;; | ||
--prefix) # space separated: | ||
prefixnext=true | ||
;; | ||
*) | ||
$prefixnext && PREFIX="$i" && prefixnext=false | ||
;; | ||
esac | ||
done | ||
IFS=OLDIFS | ||
|
||
# Set the paths needed by libtool/pkg-config/aclocal etc. By inferring | ||
# them based on --prefix , users don't have to edit ~/.bashrc. We only | ||
# append, so if a user has some other preference, that will override. | ||
PATH="${PATH}:/usr/local/bin" | ||
export PATH | ||
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PREFIX}/lib" | ||
export LD_LIBRARY_PATH | ||
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${PREFIX}/lib/pkgconfig" | ||
export PKG_CONFIG_PATH | ||
ACLOCAL_PATH="${ACLOCAL_PATH}:${PREFIX}/share/aclocal" | ||
export ACLOCAL_PATH | ||
|
||
|
||
# Pass on all args to configure | ||
autoreconf -fi && ./configure "$@" |