preserve existing environment variables
#!/bin/bash
if [ $(uname) == Darwin ]; then
- export CFLAGS="-arch x86_64"
- export FFLAGS="-static -ff2c -arch x86_64"
- export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch x86_64"
- export LDFLAGS="-Wl,-search_paths_first -L$(pwd) $LDFLAGS"
+ export CFLAGS="${CFLAGS} -arch x86_64"
+ export FFLAGS="${FFLAGS} -static -ff2c -arch x86_64"
+ export LDFLAGS="${LDFLAGS} -Wall -undefined dynamic_lookup -bundle -arch x86_64"
+ export LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L$(pwd) $LDFLAGS"
fi
