[libgda] Fixed detection of Oracle for Windows compilation
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Fixed detection of Oracle for Windows compilation
- Date: Thu, 30 Dec 2010 21:06:13 +0000 (UTC)
commit edb3ee1b0e28807060c42abe4d18287fa95ea895
Author: Vivien Malerba <malerba gnome-db org>
Date: Thu Dec 30 20:57:35 2010 +0100
Fixed detection of Oracle for Windows compilation
installers/WindowsWix/make-zip-exe.sh | 2 +-
m4/oracle.m4 | 36 +++++++++++++++++++++++++++-----
2 files changed, 31 insertions(+), 7 deletions(-)
---
diff --git a/installers/WindowsWix/make-zip-exe.sh b/installers/WindowsWix/make-zip-exe.sh
index 05853a1..90462d5 100755
--- a/installers/WindowsWix/make-zip-exe.sh
+++ b/installers/WindowsWix/make-zip-exe.sh
@@ -183,7 +183,7 @@ add_files_to_zip $archive $cross_path bin $files
files=(gdaui-demo-4.0.exe)
add_files_to_zip $archive_dev $prefix bin $files
-files=(libgda-bdb.dll libgda-mdb.dll libgda-mysql.dll libgda-postgres.dll libgda-sqlite.dll libgda-web.dll)
+files=(libgda-bdb.dll libgda-mdb.dll libgda-mysql.dll libgda-postgres.dll libgda-sqlite.dll libgda-web.dll libgda-oracle.dll)
add_files_to_zip $archive $prefix lib/libgda-4.0/providers $files
files=(gdaui-entry-filesel-spec.xml gdaui-entry-password.xml gdaui-entry-pict-spec.xml gdaui-entry-pict-spec_string.xml libgda-ui-plugins.dll)
diff --git a/m4/oracle.m4 b/m4/oracle.m4
index 2d4c094..e46662f 100644
--- a/m4/oracle.m4
+++ b/m4/oracle.m4
@@ -96,7 +96,12 @@ m4_define([_ORACLE_CHECK_INTERNAL],
then
if test "x$linklibext" = x
then
- oracle_libext=".so"
+ if test $platform_win32 = yes
+ then
+ oracle_libext=".dll"
+ else
+ oracle_libext=".so"
+ fi
else
oracle_libext="$linklibext"
fi
@@ -105,12 +110,25 @@ m4_define([_ORACLE_CHECK_INTERNAL],
do
oracledir=""
AC_MSG_CHECKING([for Oracle files in $d])
- if test -f $d/$oracle_loclibdir/libclntsh$oracle_libext
+ if test $platform_win32 = yes
+ then
+ orafname="oci$oracle_libext"
+ else
+ orafname="libclntsh$oracle_libext"
+ fi
+
+ if test -f $d/$oracle_loclibdir/$orafname
then
save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -I$d/include -I$d/include/oracle/client -I$d/rdbms/demo -I${ORACLE_HOME}/rdbms/public -I${ORACLE_HOME}/plsql/public -I$d/network/public"
save_LIBS="$LIBS"
- LIBS="$LIBS -L$d/$oracle_loclibdir -lm -ldl -lclntsh"
+ if test $platform_win32 = yes
+ then
+ CFLAGS="$CFLAGS -I$d/include"
+ LIBS="$LIBS -L$d/$oracle_loclibdir -lm -loci"
+ else
+ CFLAGS="$CFLAGS -I$d/include -I$d/include/oracle/client -I$d/rdbms/demo -I${ORACLE_HOME}/rdbms/public -I${ORACLE_HOME}/plsql/public -I$d/network/public"
+ LIBS="$LIBS -L$d/$oracle_loclibdir -lm -ldl -lclntsh"
+ fi
AC_LINK_IFELSE([[
#include <oci.h>
int main() {
@@ -126,8 +144,14 @@ int main() {
if test x$oracledir != x
then
AC_MSG_RESULT([found])
- ORACLE_CFLAGS="-I${oracledir}/include -I${oracledir}/include/oracle/client -I${oracledir}/rdbms/demo -I${ORACLE_HOME}/rdbms/public -I${ORACLE_HOME}/plsql/public -I${oracledir}/network/public"
- ORACLE_LIBS="-L${oracledir}/$oracle_loclibdir -lm -ldl -lclntsh"
+ if test $platform_win32 = yes
+ then
+ ORACLE_CFLAGS="-I${oracledir}/include"
+ ORACLE_LIBS="-L${oracledir}/$oracle_loclibdir -lm -loci"
+ else
+ ORACLE_CFLAGS="-I${oracledir}/include -I${oracledir}/include/oracle/client -I${oracledir}/rdbms/demo -I${ORACLE_HOME}/rdbms/public -I${ORACLE_HOME}/plsql/public -I${oracledir}/network/public"
+ ORACLE_LIBS="-L${oracledir}/$oracle_loclibdir -lm -ldl -lclntsh"
+ fi
break
else
AC_MSG_RESULT([not found])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]