RE: [gnome-db] cygwin update



Margus Väli wrote:
[...]
> With libgda, you apply the patch attached (./configure didn't
> find postgres libs, but that needs further investigation).

As for the postgres libraries, one of the problems was the name of the
library itself, pq.dll and a second problem is that ./configure assumes both
lib and include are sub-dirs of a common directory, which is not the case in
cygwin: the lib (pq.dll) is /bin and the header (libpq-fe.h) is in
/usr/include/.

See bellow the modifications I made in my ./configure file. They were
working 1 month ago but after returning from holidays I had severe problems
with my cygwin install and finally I had to reinstall. I restarted again,
but I've not yet reconfigured, make, etc. (each of these operations take
from 15 to 30 mn in my computer)

After, a successful compilation, the testing program
(./testing/gda-test.exe) had problems with the provider api (accessing the
directory for the postgres provider). That's were I interrupted my work on
trying libgda+postgres in cygwin.

I managed to do some more debugging but I have a different behavior when
running gdb!! The client api doesn't work, again with file/directory access
problems. The g_file_get_contents function was not able to open my config
file (I had no source code for the glib so I could not step it to see the
exact problem).

The name for the config file looked correct
(\\home\\fmartins\\.libgda\\config). Maybe some issue with back and forward
slashes, but I had to stop work on it. Hopefully, I'll restart tomorrow.

HTH,
Fernando

= postgresdir=""
... several lines skipped
=			postgresdir=$d
=			break
=		fi
=	done
=
+ # Added for the cygwin case
+	if test x$postgresdir = x
+	then
+		if test -f $dir/pq.dll
+		then
+			echo "$as_me:$LINENO: result: found cygwin Postgres in $dir" >&5
+ echo "${ECHO_T}found cygwin Postgres in $dir" >&6
+			postgresdir=$dir
+		fi
+	fi
+
=	if test x$postgresdir = x
=	then
=		{ echo "$as_me:$LINENO: WARNING: Postgres backend not used" >&5
= echo "$as_me: WARNING: Postgres backend not used" >&2;}
=	else
=		if test -f ${postgresdir}/include/libpq-fe.h
=		then
=			POSTGRES_CFLAGS=-I${postgresdir}/include
=		elif test -f ${postgresdir}/include/pgsql/libpq-fe.h
=		then
=			POSTGRES_CFLAGS=-I${postgresdir}/include/pgsql
=		elif test -f ${postgresdir}/include/postgresql/libpq-fe.h
=		then
=			POSTGRES_CFLAGS=-I${postgresdir}/include/postgresql
+ # Next case added for cygwin
+		elif test -f /usr/include/libpq-fe.h
+		then
+			POSTGRES_CFLAGS=-I/usr/include
=		else
=			{ echo "$as_me:$LINENO: WARNING: Postgres include files not found" >&5
= 	echo "$as_me: WARNING: Postgres include files not found" >&2;}
=			postgresdir=""
=		fi
-	POSTGRES_LIBS="-L${postgresdir}/lib -lpq"
+ # A test is made to check for the cygwin case
+		if test -f /usr/include/libpq-fe.h
+		then
+			POSTGRES_LIBS="-L${postgresdir} -lpq"
+		else
+			POSTGRES_LIBS="-L${postgresdir}/lib -lpq"
+		fi
=		cat >>confdefs.h <<\_ACEOF
= #define HAVE_POSTGRES 1
= _ACEOF




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]