Sophie

Sophie

distrib > Mandriva > 2008.0 > x86_64 > media > main-testing-src > by-pkgid > adf83d37405e61716c565e6e16f370ea > files > 32

mysql-5.0.45-7.3mdv2008.0.src.rpm

diff -Naur mysql-5.0.45/config/ac-macros/ha_berkeley.m4 mysql-5.0.45.oden/config/ac-macros/ha_berkeley.m4
--- mysql-5.0.45/config/ac-macros/ha_berkeley.m4	2007-07-04 15:06:08.000000000 +0200
+++ mysql-5.0.45.oden/config/ac-macros/ha_berkeley.m4	2007-07-12 14:34:56.000000000 +0200
@@ -160,7 +160,7 @@
 dnl echo ["MYSQL_CHECK_BDB_DIR ($1)"]
   dir="$1"
 
-  MYSQL_CHECK_INSTALLED_BDB([$dir/include], [$dir/lib])
+  MYSQL_CHECK_INSTALLED_BDB([$dir/include], [$dir/$MYSQL_LIB])
 
   if test X"$bdb_dir_ok" != Xinstalled; then
     # test to see if it's a source dir
diff -Naur mysql-5.0.45/config/ac-macros/ha_ndbcluster.m4 mysql-5.0.45.oden/config/ac-macros/ha_ndbcluster.m4
--- mysql-5.0.45/config/ac-macros/ha_ndbcluster.m4	2007-07-04 15:06:26.000000000 +0200
+++ mysql-5.0.45.oden/config/ac-macros/ha_ndbcluster.m4	2007-07-12 14:35:52.000000000 +0200
@@ -8,7 +8,7 @@
               AC_HELP_STRING([--with-ndb-sci=DIR],
                              [Provide MySQL with a custom location of
                              sci library. Given DIR, sci library is 
-                             assumed to be in $DIR/lib and header files
+                             assumed to be in $DIR/$MYSQL_LIB and header files
                              in $DIR/include.]),
               [mysql_sci_dir=${withval}],
               [mysql_sci_dir=""])
@@ -19,10 +19,10 @@
       AC_MSG_RESULT([-- not including sci transporter])
       ;;
     * )
-      if test -f "$mysql_sci_dir/lib/libsisci.a" -a \ 
+      if test -f "$mysql_sci_dir/$MYSQL_LIB/libsisci.a" -a \ 
               -f "$mysql_sci_dir/include/sisci_api.h"; then
         NDB_SCI_INCLUDES="-I$mysql_sci_dir/include"
-        NDB_SCI_LIBS="$mysql_sci_dir/lib/libsisci.a"
+        NDB_SCI_LIBS="$mysql_sci_dir/$MYSQL_LIB/libsisci.a"
         AC_MSG_RESULT([-- including sci transporter])
         AC_DEFINE([NDB_SCI_TRANSPORTER], [1],
                   [Including Ndb Cluster DB sci transporter])
diff -Naur mysql-5.0.45/config/ac-macros/openssl.m4 mysql-5.0.45.oden/config/ac-macros/openssl.m4
--- mysql-5.0.45/config/ac-macros/openssl.m4	2007-07-04 15:06:48.000000000 +0200
+++ mysql-5.0.45.oden/config/ac-macros/openssl.m4	2007-07-12 14:34:56.000000000 +0200
@@ -12,9 +12,9 @@
        fi
       done
 
-      for d in /usr/ssl/lib /usr/local/ssl/lib /usr/lib/openssl \
-/usr/lib /usr/lib64 /opt/ssl/lib /opt/openssl/lib \
-/usr/freeware/lib32 /usr/local/lib/ ; do
+      for d in /usr/ssl/$MYSQL_LIB /usr/local/ssl/$MYSQL_LIB /usr/lib/openssl \
+/usr/$MYSQL_LIB /usr/lib64 /opt/ssl/$MYSQL_LIB /opt/openssl/$MYSQL_LIB \
+/usr/freeware/lib32 /usr/local/$MYSQL_LIB/ ; do
       # Test for libssl using all known library file endings
       if test -f $d/libssl.a || test -f $d/libssl.so || \
          test -f $d/libssl.sl || test -f $d/libssl.dylib ; then
@@ -89,7 +89,7 @@
 		fi
 		if test -z "$openssl_libs" 
 		then
-			openssl_libs="$openssl/lib"
+			openssl_libs="$openssl/$MYSQL_LIB"
 		fi
 	fi
     MYSQL_FIND_OPENSSL([$openssl_includes], [$openssl_libs])
diff -Naur mysql-5.0.45/config/ac-macros/zlib.m4 mysql-5.0.45.oden/config/ac-macros/zlib.m4
--- mysql-5.0.45/config/ac-macros/zlib.m4	2007-07-04 15:06:41.000000000 +0200
+++ mysql-5.0.45.oden/config/ac-macros/zlib.m4	2007-07-12 14:34:56.000000000 +0200
@@ -99,13 +99,13 @@
         ;;
       *)
         # Test for libz using all known library file endings
-        if test \( -f "$mysql_zlib_dir/lib/libz.a"  -o \
-                   -f "$mysql_zlib_dir/lib/libz.so" -o \
+        if test \( -f "$mysql_zlib_dir/$MYSQL_LIB/libz.a"  -o \
+                   -f "$mysql_zlib_dir/$MYSQL_LIB/libz.so" -o \
                    -f "$mysql_zlib_dir/lib/libz.sl" -o \
                    -f "$mysql_zlib_dir/lib/libz.dylib" \) \
                 -a -f "$mysql_zlib_dir/include/zlib.h"; then
           ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
-          ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
+          ZLIB_LIBS="-L$mysql_zlib_dir/$MYSQL_LIB -lz"
           MYSQL_CHECK_ZLIB_DIR
         fi
         if test "x$mysql_cv_compress" != "xyes"; then 
diff -Naur mysql-5.0.45/configure.in mysql-5.0.45.oden/configure.in
--- mysql-5.0.45/configure.in	2007-07-04 15:06:08.000000000 +0200
+++ mysql-5.0.45.oden/configure.in	2007-07-12 14:34:56.000000000 +0200
@@ -578,7 +578,7 @@
                           upgrade the standard libc installation.],
  [
    other_libc_include="$withval/include"
-   other_libc_lib="$withval/lib"
+   other_libc_lib="$withval/$MYSQL_LIB"
    with_other_libc="yes"
    enable_shared="no"
    all_is_static="yes"
@@ -631,7 +631,7 @@
 
 if test "$TARGET_LINUX" = "true" -a "$static_nss" = ""
 then
-  tmp=`nm /usr/lib/libc.a  | grep _nss_files_getaliasent_r`
+  tmp=`nm /usr/$MYSQL_LIB/libc.a  | grep _nss_files_getaliasent_r`
   if test -n "$tmp"
   then
      STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv"
@@ -857,7 +857,7 @@
 
     if test "$with_libwrap" != "yes"; then
       CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include"
-      LDFLAGS="${LDFLAGS} -L$with_libwrap/lib"
+      LDFLAGS="${LDFLAGS} -L$with_libwrap/$MYSQL_LIB"
     fi
 
     _libs=${LIBS}
@@ -874,7 +874,7 @@
         AC_DEFINE([LIBWRAP], [1], [Define if you have -lwrap])
         AC_DEFINE([HAVE_LIBWRAP], [1], [Define if have -lwrap])
 	if test "$with_libwrap" != "yes"; then
-	    WRAPLIBS="-L${with_libwrap}/lib"
+	    WRAPLIBS="-L${with_libwrap}/$MYSQL_LIB"
 	fi
 	WRAPLIBS="${WRAPLIBS} -lwrap",
         AC_MSG_RESULT(no)
@@ -2402,6 +2402,32 @@
 
 AC_SUBST(tools_dirs)
 
+# Check for native library dir name
+case $host in
+*-*-linux*)
+  # Test if the compiler is 64bit
+  echo 'int i;' > conftest.$ac_ext
+  mysql_cv_cc_64bit_output=no
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *"ELF 64"*)
+      mysql_cv_cc_64bit_output=yes
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+case $host_cpu:$mysql_cv_cc_64bit_output in
+powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+  MYSQL_LIB="lib64"
+  ;;
+*:*)
+  MYSQL_LIB="lib"
+  ;;
+esac
+
 #MYSQL_CHECK_CPU
 MYSQL_CHECK_VIO
 MYSQL_CHECK_OPENSSL