summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--volk/Makefile.am2
-rw-r--r--volk/config/orc.m414
-rw-r--r--volk/include/volk/archs.xml2
-rw-r--r--volk/include/volk/make_set_simd.py51
-rw-r--r--volk/lib/Makefile.am2
5 files changed, 52 insertions, 19 deletions
diff --git a/volk/Makefile.am b/volk/Makefile.am
index d1ebdc78d..271d495cd 100644
--- a/volk/Makefile.am
+++ b/volk/Makefile.am
@@ -25,7 +25,7 @@ include $(top_srcdir)/Makefile.common
EXTRA_DIST = bootstrap configure config.h.in volk_config.h
SUBDIRS = config
-if HAVE_ORC
+if LV_HAVE_ORC
SUBDIRS += orc
endif
SUBDIRS += include lib
diff --git a/volk/config/orc.m4 b/volk/config/orc.m4
index 7845a940c..9645661b0 100644
--- a/volk/config/orc.m4
+++ b/volk/config/orc.m4
@@ -6,18 +6,8 @@ dnl ORC_CHECK([REQUIRED_VERSION])
AC_DEFUN([ORC_CHECK],
[
ORC_REQ=ifelse([$1], , "0.4.6", [$1])
-
- AC_ARG_ENABLE(orc,
- AC_HELP_STRING([--enable-orc],[use Orc if installed]),
- [case "${enableval}" in
- auto) enable_orc=auto ;;
- yes) enable_orc=yes ;;
- no) enable_orc=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;;
- esac
- ],
- [enable_orc=auto]) dnl Default value
-
+
+ enable_orc = auto
if test "x$enable_orc" != "xno" ; then
PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
AC_DEFINE(HAVE_ORC, 1, [Use Orc])
diff --git a/volk/include/volk/archs.xml b/volk/include/volk/archs.xml
index b61bfca09..a19a5add9 100644
--- a/volk/include/volk/archs.xml
+++ b/volk/include/volk/archs.xml
@@ -7,7 +7,7 @@
<arch name="orc" type="all">
<flag>lorc-0.4</flag>
- <overrule>HAVE_ORC</overrule>
+ <overrule>LV_HAVE_ORC</overrule>
<overrule_val>no</overrule_val>
</arch>
diff --git a/volk/include/volk/make_set_simd.py b/volk/include/volk/make_set_simd.py
index d7109cfcb..f2b7c0656 100644
--- a/volk/include/volk/make_set_simd.py
+++ b/volk/include/volk/make_set_simd.py
@@ -180,11 +180,22 @@ def make_set_simd(dom) :
tempstring = tempstring + " indCXX=no\n"
tempstring = tempstring + " indLV_ARCH=no\n"
elif atype == "all":
- tempstring = tempstring + " if test -z \"" + overrule + "\" || test \"$" + overrule + "\" != \"" + overrule_val + "\" || test \"$OVERRULE_FLAG\" == \"no\"; then\n"
+ tempstring = tempstring + " for i in $cf_with_lv_arch\n"
+ tempstring = tempstring + " do\n"
+ tempstring = tempstring + " if test \"X$i\" = X" + arch + "; then\n";
+ tempstring = tempstring + " indLV_ARCH=yes\n"
+ tempstring = tempstring + " fi\n"
+ tempstring = tempstring + " done\n"
+ tempstring = tempstring + " if test -n \"" + overrule + "\" && test \"$" + overrule + "\" == \"" + overrule_val + "\" && test \"$OVERRULE_FLAG\" == \"yes\" && test \"$indLV_ARCH\" == \"yes\"; then\n"
+ tempstring = tempstring + " indLV_ARCH=no\n"
+ tempstring = tempstring + " fi\n"
+ tempstring = tempstring + " if test \"$indLV_ARCH\" == \"yes\"; then\n"
tempstring = tempstring + " AC_DEFINE(LV_HAVE_" + arch.swapcase() + ", 1, [" + arch + " flag set])\n";
tempstring = tempstring + " LV_HAVE_" + arch.swapcase() + "=yes\n";
tempstring = tempstring + " BUILT_ARCHS=\"${BUILT_ARCHS} " + arch + "\"\n";
tempstring = tempstring + " fi\n"
+ tempstring = tempstring + " indLV_ARCH=no\n"
+
tempstring = tempstring + " ;;\n"
tempstring = tempstring + " (powerpc)\n"
@@ -228,11 +239,44 @@ def make_set_simd(dom) :
tempstring = tempstring + " indCXX=no\n"
tempstring = tempstring + " indLV_ARCH=no\n"
elif atype == "all":
- tempstring = tempstring + " if test -z \"" + overrule + "\" || test \"$" + overrule + "\" != \"" + overrule_val + "\" || test \"$OVERRULE_FLAG\" == \"no\"; then\n"
+ tempstring = tempstring + " for i in $cf_with_lv_arch\n"
+ tempstring = tempstring + " do\n"
+ tempstring = tempstring + " if test \"X$i\" = X" + arch + "; then\n";
+ tempstring = tempstring + " indLV_ARCH=yes\n"
+ tempstring = tempstring + " fi\n"
+ tempstring = tempstring + " done\n"
+ tempstring = tempstring + " if test -n \"" + overrule + "\" && test \"$" + overrule + "\" == \"" + overrule_val + "\" && test \"$OVERRULE_FLAG\" == \"yes\" && test \"$indLV_ARCH\" == \"yes\"; then\n"
+ tempstring = tempstring + " indLV_ARCH=no\n"
+ tempstring = tempstring + " fi\n"
+ tempstring = tempstring + " if test \"$indLV_ARCH\" == \"yes\"; then\n"
+ tempstring = tempstring + " AC_DEFINE(LV_HAVE_" + arch.swapcase() + ", 1, [" + arch + " flag set])\n";
+ tempstring = tempstring + " LV_HAVE_" + arch.swapcase() + "=yes\n";
+ tempstring = tempstring + " BUILT_ARCHS=\"${BUILT_ARCHS} " + arch + "\"\n";
+ tempstring = tempstring + " fi\n"
+ tempstring = tempstring + " indLV_ARCH=no\n"
+ tempstring = tempstring + " ;;\n"
+ tempstring = tempstring + " (*)\n"
+ for domarch in dom:
+ arch = str(domarch.attributes["name"].value);
+ atype = str(domarch.attributes["type"].value);
+ flag = domarch.getElementsByTagName("flag");
+ flag = str(flag[0].firstChild.data);
+ if atype == "all":
+ tempstring = tempstring + " for i in $cf_with_lv_arch\n"
+ tempstring = tempstring + " do\n"
+ tempstring = tempstring + " if test \"X$i\" = X" + arch + "; then\n";
+ tempstring = tempstring + " indLV_ARCH=yes\n"
+ tempstring = tempstring + " fi\n"
+ tempstring = tempstring + " done\n"
+ tempstring = tempstring + " if test -n \"" + overrule + "\" && test \"$" + overrule + "\" == \"" + overrule_val + "\" && test \"$OVERRULE_FLAG\" == \"yes\" && test \"$indLV_ARCH\" == \"yes\"; then\n"
+ tempstring = tempstring + " indLV_ARCH=no\n"
+ tempstring = tempstring + " fi\n"
+ tempstring = tempstring + " if test \"$indLV_ARCH\" == \"yes\"; then\n"
tempstring = tempstring + " AC_DEFINE(LV_HAVE_" + arch.swapcase() + ", 1, [" + arch + " flag set])\n";
tempstring = tempstring + " LV_HAVE_" + arch.swapcase() + "=yes\n";
tempstring = tempstring + " BUILT_ARCHS=\"${BUILT_ARCHS} " + arch + "\"\n";
tempstring = tempstring + " fi\n"
+ tempstring = tempstring + " indLV_ARCH=no\n"
tempstring = tempstring + " ;;\n"
tempstring = tempstring + " esac\n"
tempstring = tempstring + " LV_CXXFLAGS=\"${LV_CXXFLAGS} ${ADDONS}\"\n"
@@ -240,6 +284,5 @@ def make_set_simd(dom) :
tempstring = tempstring + "])\n"
return tempstring;
-
-
+
diff --git a/volk/lib/Makefile.am b/volk/lib/Makefile.am
index faab4a010..253033461 100644
--- a/volk/lib/Makefile.am
+++ b/volk/lib/Makefile.am
@@ -140,7 +140,7 @@ volk_orc_LDFLAGS = \
volk_orc_LIBADD = \
../orc/libvolk_orc.la
-if HAVE_ORC
+if LV_HAVE_ORC
libvolk_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 $(volk_orc_LDFLAGS)
libvolk_runtime_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 $(volk_orc_LDFLAGS)
libvolk_la_LIBADD = $(volk_orc_LIBADD)