From: Marco van Wieringen Date: Sun, 4 Apr 2010 10:55:22 +0000 (+0200) Subject: Use -lq.1 -lcompat.1 as shared libraries instead of linking with -lingres which is... X-Git-Tag: Release-5.0.2~110 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=58bf155b833be0693c7d71afe83d7041b25a1845;p=bacula%2Fbacula 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. --- 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--- */