aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-04-16 16:28:41 +0200
committerAnton Khirnov <anton@khirnov.net>2024-04-16 16:28:41 +0200
commitc6361b600df58ad1c20c6e45384f408543dcf5c2 (patch)
treed329f76494dc2df5766a4f90b320b38be8f06c05 /configure
parent3054f2d8c4fbd71934864c4d3a70bcf74367df57 (diff)
Allow specifying extra cflags/ldflags.HEADmaster
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure b/configure
index a2dfa88..a8b5804 100755
--- a/configure
+++ b/configure
@@ -79,7 +79,17 @@ for arg; do
continue
fi
- die "Unknown commandline argument: $name $val"
+ case "$name" in
+ extra_cflags)
+ extra_cflags=$val $extra_cflags
+ ;;
+ extra_ldflags)
+ extra_ldflags=$val $extra_ldflags
+ ;;
+ *)
+ die "Unknown commandline argument: $arg"
+ ;;
+ esac
done
probe_arch
@@ -109,7 +119,9 @@ cat > config.mak <<EOF
SOURCE_DIR = $source_dir
CC = $cc
CFLAGS_DEP = $mpi_cflags
+CFLAGS_EXTRA = $extra_cflags
LDFLAGS_DEP = $mpi_libs
+LDFLAGS_EXTRA = $extra_ldflags
EOF
cat > config.h <<EOF