Hi,

> In other words, it seems that there may be another better solution.
> 
> Step 1. check specific platform really requires -latomic in configure.ac
> Step 2. apply -latomic in Makefile.am (like as your proposed patch does)
> 

I've attached patch to fix this issue.
It seems that it's ok for mips and mipsel, but I'm not sure for m68k.

This patch is partially commited to upstream, it means Groonga 6.0.0 (not 
released yet) 
will support mips and mipsel architecture.

-- 
HAYASHI Kentaro <[email protected]>
diff --git a/configure.ac b/configure.ac
index d4bd3e5..bd0b6dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,19 @@ case "$host_os" in
 esac
 AC_MSG_RESULT([$solaris])
 
+AC_MSG_CHECKING([for platform which requires libatomic])
+case "$host" in
+  mips-*|mipsel-*|m68k-*)
+    platform_use_libatomic=yes
+    ATOMIC_LIBS="-latomic"
+    ;;
+  *)
+    platform_use_libatomic=no
+    ;;
+esac
+AC_MSG_RESULT([$platform_use_libatomic])
+AC_SUBST(ATOMIC_LIBS)
+
 AC_C_BIGENDIAN
 AC_PROG_CXX
 AC_PROG_CC
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 93c9f2d..195b329 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -46,7 +46,8 @@ endif
 
 libgroonga_la_LIBADD +=				\
 	$(ONIGMO_LIBS)				\
-	$(LIBLZ4_LIBS)
+	$(LIBLZ4_LIBS)				\
+	$(ATOMIC_LIBS)
 
 if WITH_LEMON
 BUILT_SOURCES =					\

Reply via email to