Hi all, porting QGIS to android I ported libpq as well, I had to modify two files to successfully compile it without-readline. I attach the two needed minor patches. further informations can be found at android.qgis.org.

Thanks for considering the patches.
Marco Bernasocchi

www.opengis.ch
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a9e20cf..a5cc8eb 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2642,8 +2642,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  case $host_os in
+  # This must be Linux Android ELF which has no support for versioned libs.
+  linux-android*)
+    library_names_spec='$libname${shared_ext}'
+    soname_spec='${libname}${shared_ext}'
+    ;;
+  *)  
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
diff --git a/src/port/crypt.c b/src/port/crypt.c
index 85b98c5..416c509 100644
--- a/src/port/crypt.c
+++ b/src/port/crypt.c
@@ -87,7 +87,10 @@ static int	des_cipher(const char *in, char *out, long salt, int num_iter);
  * define "B64" to be the declaration for a 64 bit integer.
  * XXX this feature is currently unused, see "endian" comment below.
  */
-#define B64 __int64
+//to avoid crypt.c:237: error: expected specifier-qualifier-list before '__int64' when cross compiling for android
+#ifndef ANDROID
+    #define B64 __int64
+#endif
 
 /*
  * define "LARGEDATA" to get faster permutations, by using about 72 kilobytes
-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to