]> arthur.barton.de Git - netatalk.git/commitdiff
Better 64 bit library support for Solaris, implements #3090159
authorFrank Lahm <franklahm@googlemail.com>
Sun, 24 Oct 2010 14:56:42 +0000 (16:56 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Sun, 24 Oct 2010 14:56:42 +0000 (16:56 +0200)
configure.in
macros/db3-check.m4

index c271ad58d7ef663beffe41b1a807544f2904e73c..29a03904f76e2f9ac81175af50c1281fb3374261 100644 (file)
@@ -95,36 +95,34 @@ dnl 64bit platform check
 dnl --------------------------------------------------------------------------
 
 AC_MSG_CHECKING([whether to check for 64bit libraries])
-dnl Determine libdir name
-case $host in
-*-*-linux*)
-  # Test if the compiler is 64bit
-  echo 'int i;' > conftest.$ac_ext
-  atalk_cv_cc_64bit_output=no
-  if AC_TRY_EVAL(ac_compile); then
+# Test if the compiler is in 64bit mode
+echo 'int i;' > conftest.$ac_ext
+atalk_cv_cc_64bit_output=no
+if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.$ac_objext` in
     *"ELF 64"*)
       atalk_cv_cc_64bit_output=yes
       ;;
     esac
-  fi
-  rm -rf conftest*
-  ;;
-esac
-
-dnl
-dnl FIXME: Do we need something like this for Solaris 64bit?
-dnl
+fi
+rm -rf conftest*
 
 case $host_cpu:$atalk_cv_cc_64bit_output in
-powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
-  atalk_libname="lib64"
-  AC_MSG_RESULT([yes])
-  ;;
+powerpc64:yes | s390x:yes | sparc*:yes | x86_64:yes | i386:yes)
+    AC_MSG_RESULT([yes])
+    case $target_os in
+    solaris2*)
+        atalk_libname="lib/64"
+        ;;
+    *)
+        atalk_libname="lib64"
+        ;;
+    esac
+    ;;
 *:*)
-  atalk_libname="lib"
-  AC_MSG_RESULT([no])
-  ;;
+    AC_MSG_RESULT([no])
+    atalk_libname="lib"
+    ;;
 esac
 
 dnl --------------------------------------------------------------------------
index 7b3c64edecdb1e62bf586399cc6e98de652231a8..081d27be75f28222122d1fb283ef21b24cdd4f44 100644 (file)
@@ -161,8 +161,10 @@ AC_DEFUN([AC_PATH_BDB],[
                             break;
                         fi
 
-                        dnl -- Search for 64bit lib in "lib" too
-                        if test x"$atalk_libname" = x"lib64" ; then
+                        dnl -- Search lib in "lib" too, as $atalk_libname might be set
+                        dnl -- to "lib64" or "lib/64" which would not be found above
+                        dnl -- if 64bit lib were installed in a dir named "lib"
+                        if test x"$atalk_libname" != x"lib" ; then
                            bdblibdir="${bdbdir}/lib"
                            bdbbindir="${bdbdir}/bin"