4 # Convert paths to .so/.dylib/.dll into directories that can be used with
5 # -L/path and -Wl,-rpath,/path compiler args. Also strip out -l flags,
6 # as autoconf will add them for us for feature detection.
8 if [ "$i" = "-Wl,-rpath" ]; then continue; fi
9 echo "$i" | perl -p -e "s/'/\\\\'/g;" \
11 -e 's;(.*)[/\\].*\.(so|dylib|dll)$;-L\1 -Wl,-rpath,\1;g;'
15 # This is an extra linker flag that buck appends on OSX that's not valid
16 # This probably requires a patch to buck
17 LDFLAGS=$(get_ldflags "$@" | uniq | tr '\n' ' ' | perl -pe 's;-Xlinker \@executable_path\S*;;g')
20 export BOOST_LDFLAGS="$LDFLAGS"
21 export BOOST_CPPFLAGS="$CPPFLAGS"
23 SRCROOT=$(dirname "$(readlink "$SRCDIR"/configure.ac)")
24 # Temp dir because autoconf doesn't like '#' in the working directory
26 trap 'rm -rf "$conf_dir"' EXIT
28 autoreconf -iv "$SRCROOT" && \
29 "$SRCROOT/configure" "$BOOST_FLAG" && \
30 cp -pvf folly-config.h "$OUT"