Check if 64-bit libraries are built by default and set variables and
paths accordingly.

Signed-off-by: Ramon de Carvalho Valle <[email protected]>
---
 configure.in |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/configure.in b/configure.in
index 6148889..e14a0d3 100644
--- a/configure.in
+++ b/configure.in
@@ -34,6 +34,7 @@ AC_FUNC_MEMCMP
 AC_FUNC_STRFTIME
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([getcwd])
+AC_CHECK_SIZEOF([long int])
 
 # Used in the init scripts
 AC_SUBST(ID, /usr/bin/id)
@@ -54,22 +55,19 @@ s390=0
 
 # Arch specific stuff
 case $target in
-       *64*)
-               lib="lib64"
-               AM_CONDITIONAL(S390, false) ;;
-       *s390x*)
-               s390=1
-               lib="lib64"
-               AM_CONDITIONAL(S390, true) ;;
        *s390*)
                s390=1
-               lib="lib"
                AM_CONDITIONAL(S390, true) ;;
         *)
-               lib="lib"
                AM_CONDITIONAL(S390, false) ;;
 esac
 
+if test "x$SIZEOF_LONG_INT" = "x8"; then
+  lib="lib64"
+else
+  lib="lib"
+fi
+
 if test "x$prefix" == x/usr; then
         AC_SUBST(CONFIG_PATH, /var/lib/opencryptoki)
        AC_SUBST(CONFIG_PATH_ETC, /etc)
-- 
1.6.3.3


------------------------------------------------------------------------------
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to