summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure27
1 files changed, 27 insertions, 0 deletions
diff --git a/configure b/configure
index b882d1901..dfd37b199 100755
--- a/configure
+++ b/configure
@@ -4049,6 +4049,33 @@ if test "$usb_redir" != "no" ; then
fi
fi
+if test "$linux_user" = "no" -a "$cpu" = "ppc" -a "$targetos" = "Linux" ; then
+ # Do we need libm
+ cat > $TMPC << EOF
+ #include <unistd.h>
+ #include <stdint.h>
+ #include <qemu/atomic.h>
+ int64_t val;
+ int main(int argc, char **argv)
+ {
+ val = (int64_t)read(0, NULL, 0);
+ if (atomic_read(&val) == -1) {
+ return 0;
+ }
+ return 1;
+ }
+EOF
+ if compile_prog "-Iinclude" "" ; then
+ :
+ echo "No need to link with -latomic on powerpc-linux"
+ elif compile_prog "-Iinclude" "-latomic" ; then
+ echo "Link with -latomic on powerpc-linux"
+ libs_softmmu="$libs_softmmu -latomic"
+ else
+ error_exit "libatomic check failed"
+ fi
+fi
+
##########################################
# check if we have VSS SDK headers for win