From 58bf155b833be0693c7d71afe83d7041b25a1845 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Sun, 4 Apr 2010 12:55:22 +0200 Subject: [PATCH] Use -lq.1 -lcompat.1 as shared libraries instead of linking with -lingres which is a static library. Also need to change generated code of esqlcc a bit to get things to link with the IIsqlca function. --- bacula/autoconf/bacula-macros/db.m4 | 2 +- bacula/configure | 2 +- bacula/src/cats/myingres.c | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bacula/autoconf/bacula-macros/db.m4 b/bacula/autoconf/bacula-macros/db.m4 index 892447f6b2..7e75263f0a 100644 --- a/bacula/autoconf/bacula-macros/db.m4 +++ b/bacula/autoconf/bacula-macros/db.m4 @@ -565,7 +565,7 @@ AC_HELP_STRING([--with-ingres@<:@=DIR@:>@], [Include Ingres support. DIR is the fi fi SQL_INCLUDE=-I$INGRES_INCDIR - SQL_LFLAGS="-L$INGRES_LIBDIR -lingres" + SQL_LFLAGS="-L$INGRES_LIBDIR -lq.1 -lcompat.1" SQL_BINDIR=$INGRES_BINDIR SQL_LIB=$INGRES_LIBDIR/libingres.a AC_DEFINE(HAVE_INGRES, 1, [Set if have Ingres Database]) diff --git a/bacula/configure b/bacula/configure index ffb4b3e4f8..7c469dfe8d 100755 --- a/bacula/configure +++ b/bacula/configure @@ -28522,7 +28522,7 @@ echo "$as_me: error: Invalid Ingres directory $withval - unable to find Ingres h fi fi SQL_INCLUDE=-I$INGRES_INCDIR - SQL_LFLAGS="-L$INGRES_LIBDIR -lingres" + SQL_LFLAGS="-L$INGRES_LIBDIR -lq.1 -lcompat.1" SQL_BINDIR=$INGRES_BINDIR SQL_LIB=$INGRES_LIBDIR/libingres.a diff --git a/bacula/src/cats/myingres.c b/bacula/src/cats/myingres.c index 48a797a66d..24b98ea4e1 100644 --- a/bacula/src/cats/myingres.c +++ b/bacula/src/cats/myingres.c @@ -32,13 +32,21 @@ #include #include #include -IISQLCA *IIsqlca(); -#define sqlca (*(IIsqlca())) #include #include #include #include #include "myingres.h" + +#ifdef __cplusplus +extern "C" { +#endif +IISQLCA *IIsqlca(); +#ifdef __cplusplus +} +#endif +#define sqlca (*(IIsqlca())) + /* * ---Implementations--- */ -- 2.39.5