Debian Codegraph @

configure

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 echoscip-shell system . . echo. "Running configure script"
4
5 # Find compiler
6 CC=`"${R_HOME}"/bin/R CMD config CC`
7
8 # Detect whether -latomic is needed during linking. This is needed on some
9 # platforms, notably ARM (Raspberry Pi).
10 echoscip-shell system . . echo. "#include <stdint.h>
11 uint64_t v;
12 int main() {
13 return (int)__atomic_load_n(&v, __ATOMIC_ACQUIRE);
14 }" | ${CC} -x c - -o /dev/nullscip-shell filesystem . . `/dev/null`. > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
15
16 if [scip-shell system . . `[`. $? -eq 0 ]; then
17 echoscip-shell system . . echo. "-latomic linker flag not needed."
18 else
19 echoscip-shell system . . echo. "-latomic linker flag needed."
20 EXTRA_PKG_LIBS=-latomic
21 fi
22
23 case "$CC" in
24 *undefined*)
25 echoscip-shell system . . echo. "Found UBSAN. Will skip tests that raise false positives."
26 PKG_CPPFLAGS="$PKG_CPPFLAGS -DUSING_UBSAN"
27 ;;
28 esac
29
30 # Write to Makevars
31 sedscip-shell system . . sed. -e "s|@extra_pkg_libs@|$EXTRA_PKG_LIBS|" -e "s|@pkg_cppflags@|$PKG_CPPFLAGS|" \
32 src/Makevars.in > src/Makevars
33
34 # Success
35 exit 0