Allow customization of compiler used in configure.
This commit is contained in:
parent
4e73273cbd
commit
d242597e73
1 changed files with 7 additions and 4 deletions
11
configure
vendored
11
configure
vendored
|
@ -18,7 +18,7 @@ LIBS="-lm -pthread"
|
|||
|
||||
|
||||
# Set default args for all platforms
|
||||
SCRIPT_ARGS="--prefix=/usr/local --enable-ld-extra --lib-name=Cytoplasm --lib-version=0.4.0 --static $@"
|
||||
SCRIPT_ARGS="--cc=cc --prefix=/usr/local --enable-ld-extra --lib-name=Cytoplasm --lib-version=0.4.0 --static $@"
|
||||
|
||||
# Set platform specific args
|
||||
case "$(uname)" in
|
||||
|
@ -36,6 +36,9 @@ echo "Ran with arguments: $SCRIPT_ARGS"
|
|||
# Process all arguments
|
||||
for arg in $SCRIPT_ARGS; do
|
||||
case "$arg" in
|
||||
--cc=*)
|
||||
CC=$(echo "$arg" | cut -d '=' -f 2-)
|
||||
;;
|
||||
--with-openssl)
|
||||
TLS_IMPL="TLS_OPENSSL"
|
||||
TLS_LIBS="-lcrypto -lssl"
|
||||
|
@ -81,7 +84,7 @@ for arg in $SCRIPT_ARGS; do
|
|||
STATIC=""
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
echo "Invalid argument: $arg"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
@ -129,7 +132,7 @@ compile_obj() {
|
|||
src="$1"
|
||||
obj="$2"
|
||||
|
||||
cc -I${INCLUDE} -MM -MT "${obj}" "${src}"
|
||||
${CC} -I${INCLUDE} -MM -MT "${obj}" "${src}"
|
||||
echo "${TAB}@mkdir -p $(dirname ${obj})"
|
||||
echo "${TAB}\$(CC) \$(CFLAGS) -fPIC -c -o \"${obj}\" \"${src}\""
|
||||
}
|
||||
|
@ -195,7 +198,7 @@ cat << EOF > Makefile
|
|||
# Generated by '$0' on $(date).
|
||||
# This file should generally not be manually edited.
|
||||
|
||||
CC = cc
|
||||
CC = ${CC}
|
||||
PREFIX = ${PREFIX}
|
||||
CFLAGS = ${CFLAGS}
|
||||
LDFLAGS = ${LDFLAGS}
|
||||
|
|
Loading…
Reference in a new issue