Add check for -latomic
[sliver-openvswitch.git] / m4 / openvswitch.m4
index 6b9a378..55c48ec 100644 (file)
@@ -205,7 +205,7 @@ AC_DEFUN([OVS_CHECK_PYTHON],
           for dir in $PATH; do
             IFS=$ovs_save_IFS
             test -z "$dir" && dir=.
-            if test -x $dir/$binary && $dir/$binary -c 'import sys
+            if test -x "$dir"/"$binary" && "$dir"/"$binary" -c 'import sys
 if sys.hexversion >= 0x02040000 and sys.hexversion < 0x03000000:
     sys.exit(0)
 else:
@@ -432,6 +432,12 @@ static thread_local int var;], [return var;])],
      fi
    fi])
 
+dnl OVS_CHECK_ATOMIC_LIBS
+dnl
+dnl Check to see if -latomic is need for GCC atomic built-ins.
+AC_DEFUN([OVS_CHECK_ATOMIC_LIBS],
+   [AC_SEARCH_LIBS([__atomic_load_8], [atomic])])
+
 dnl OVS_CHECK_GCC4_ATOMICS
 dnl
 dnl Checks whether the compiler and linker support GCC 4.0+ atomic built-ins.